public class MX4JComponentAdapter<T> extends AbstractComponentAdapter<T> implements javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.PassivationCapable
| Modifier and Type | Field and Description |
|---|---|
protected ExoContainer |
exocontainer
.
|
protected T |
instance_ |
protected boolean |
isInitialized |
protected boolean |
isSingleton
Indicates whether or not it should be managed as a singleton
|
protected Lock |
lock |
protected AtomicReference<Class<? extends Annotation>> |
scope
The scope of the adapter
|
| Modifier | Constructor and Description |
|---|---|
|
MX4JComponentAdapter(ExoContainer holder,
ConcurrentContainer container,
Object key,
Class<T> implementation) |
protected |
MX4JComponentAdapter(ExoContainer holder,
ConcurrentContainer container,
Object key,
Class<T> implementation,
Lock lock) |
| Modifier and Type | Method and Description |
|---|---|
protected T |
create()
Must be used to create Singleton or Prototype only
|
T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
protected T |
createInstance(javax.enterprise.context.spi.Context ctx) |
void |
destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
boolean |
equals(Object obj) |
T |
getComponentInstance()
Retrieve the component instance.
|
String |
getId() |
Class<? extends Annotation> |
getScope()
Gives the scope of the adapter
|
protected static Method |
getSetMethod(Class<?> clazz,
String name,
Class<?> pluginClass)
Finds the best "set method" according to the given method name and type of plugin
|
int |
hashCode() |
boolean |
isSingleton()
Indicates whether or not this adapter is a singleton
|
protected boolean |
manageScope(boolean isSingleton,
boolean isInitialized,
boolean hasInjectableConstructor,
boolean isInjectPresent)
Defines the scope of the component
|
checkTypeCompatibility, getComponentImplementation, getComponentKey, toStringprotected transient volatile T instance_
protected final transient Lock lock
protected volatile boolean isSingleton
protected transient volatile boolean isInitialized
protected final transient AtomicReference<Class<? extends Annotation>> scope
protected final transient ExoContainer exocontainer
public MX4JComponentAdapter(ExoContainer holder, ConcurrentContainer container, Object key, Class<T> implementation)
protected MX4JComponentAdapter(ExoContainer holder, ConcurrentContainer container, Object key, Class<T> implementation, Lock lock)
public T getComponentInstance()
ComponentAdapterpublic Class<? extends Annotation> getScope()
protected T createInstance(javax.enterprise.context.spi.Context ctx)
public boolean isSingleton()
protected static Method getSetMethod(Class<?> clazz, String name, Class<?> pluginClass)
protected T create()
public T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
create in interface javax.enterprise.context.spi.Contextual<T>public void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroy in interface javax.enterprise.context.spi.Contextual<T>public String getId()
getId in interface javax.enterprise.inject.spi.PassivationCapableprotected boolean manageScope(boolean isSingleton,
boolean isInitialized,
boolean hasInjectableConstructor,
boolean isInjectPresent)
true if the component is considered as a singleton,
false otherwise.Copyright © 2017 eXo Platform SAS. All Rights Reserved.