public class AsyncCreationalContext extends AbstractCreationalContext
destructionCallbacks, immutableContext, initializationCallbacks, scope, unresolvedProxies, wired
Constructor and Description |
---|
AsyncCreationalContext(AsyncBeanManager beanManager,
boolean immutableContext,
Class<? extends Annotation> scope) |
AsyncCreationalContext(AsyncBeanManager beanManager,
Class<? extends Annotation> scope) |
Modifier and Type | Method and Description |
---|---|
void |
addProxyReference(Object proxyRef,
Object realRef)
Adds a lookup from a proxy to the actual bean instance that it is proxying.
|
<T> void |
addWait(BeanRef beanRef,
CreationalCallback<T> callback)
Add a
CreationalCallback to the wait queue. |
void |
finish(Runnable finishCallback) |
AsyncBeanContext |
getBeanContext() |
<T> void |
getBeanInstance(CreationalCallback<T> creationalCallback,
Class<T> beanType,
Annotation[] qualifiers) |
<T> void |
getInstanceOrNew(AsyncBeanProvider<T> beanProvider,
CreationalCallback<T> creationalCallback,
Class<?> beanType,
Annotation[] qualifiers) |
<T> void |
getSingletonInstanceOrNew(AsyncInjectionContext injectionContext,
AsyncBeanProvider<T> beanProvider,
CreationalCallback<T> creationalCallback,
Class<T> beanType,
Annotation[] qualifiers)
This method is invoked by generated code (in BootstrapperImpl).
|
<T> void |
getSingletonInstanceOrNew(AsyncInjectionContext injectionContext,
AsyncBeanProvider<T> beanProvider,
CreationalCallback<T> creationalCallback,
Class type,
Class<T> beanType,
Annotation[] qualifiers,
String name)
Implements the singleton loading logic for beans.
|
<T> void |
notifyAllWaiting(BeanRef beanRef,
T instance)
Notify all waiting callbacks for the instance result from the specified bean provider.
|
addBean, addBean, addDestructionCallback, addInitializationCallback, addUnresolvedProxy, destroyContext, fireAllInitCallbacks, getAllCreatedBeanInstances, getAllCreatedBeans, getBeanReference, getWiredOrNew
public AsyncCreationalContext(AsyncBeanManager beanManager, Class<? extends Annotation> scope)
public AsyncCreationalContext(AsyncBeanManager beanManager, boolean immutableContext, Class<? extends Annotation> scope)
public void addProxyReference(Object proxyRef, Object realRef)
CreationalContext
proxyRef
- the reference to the proxy instancerealRef
- the reference to the actual bean instance which the proxy wrapspublic <T> void getBeanInstance(CreationalCallback<T> creationalCallback, Class<T> beanType, Annotation[] qualifiers)
public <T> void addWait(BeanRef beanRef, CreationalCallback<T> callback)
CreationalCallback
to the wait queue. Or null to indicate that the first dependency
on that bean has begun to load it.T
- the type of the bean.beanRef
- the bean reference for the callback.callback
- the instance of the bean.public <T> void notifyAllWaiting(BeanRef beanRef, T instance)
T
- the type of the bean.beanRef
- the bean reference for the callback.instance
- the instance of the bean.public <T> void getSingletonInstanceOrNew(AsyncInjectionContext injectionContext, AsyncBeanProvider<T> beanProvider, CreationalCallback<T> creationalCallback, Class<T> beanType, Annotation[] qualifiers)
public <T> void getSingletonInstanceOrNew(AsyncInjectionContext injectionContext, AsyncBeanProvider<T> beanProvider, CreationalCallback<T> creationalCallback, Class type, Class<T> beanType, Annotation[] qualifiers, String name)
CreationalCallback
.T
- the parameterized bean type.injectionContext
- the current AsyncInjectionContext
beanProvider
- the reference to the AsyncBeanProvider
which is capable of creating a new instance.creationalCallback
- the reference to the CreationalCallback
which the instance will be provided to when the bean
has finished loading.beanType
- the type of the bean.qualifiers
- the qualifiers for the bean.public <T> void getInstanceOrNew(AsyncBeanProvider<T> beanProvider, CreationalCallback<T> creationalCallback, Class<?> beanType, Annotation[] qualifiers)
public void finish(Runnable finishCallback)
public AsyncBeanContext getBeanContext()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.