Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.client.container.async
Interface AsyncBeanManager

All Superinterfaces:
ClientBeanManager
All Known Implementing Classes:
AsyncBeanManagerImpl, SyncToAsyncBeanManagerAdapter

public interface AsyncBeanManager
extends ClientBeanManager

Author:
Mike Brock

Method Summary
 void destroyBean(Object ref, Runnable runnable)
          Destroy the bean and all other beans associated with its AsyncCreationalContext.
<T> AsyncBeanDef<T>
lookupBean(Class<T> type, Annotation... qualifiers)
          Looks up a bean reference based on type and qualifiers.
<T> Collection<AsyncBeanDef<T>>
lookupBeans(Class<T> type)
          Looks up all beans of the specified type.
<T> Collection<AsyncBeanDef<T>>
lookupBeans(Class<T> type, Annotation... qualifiers)
          Looks up a bean reference based on type and qualifiers.
 Collection<AsyncBeanDef> lookupBeans(String name)
          Looks up all beans with the specified bean name as specified by Named.
 
Methods inherited from interface org.jboss.errai.ioc.client.container.ClientBeanManager
addBeanToContext, addDestructionCallback, addProxyReference, destroyAllBeans, destroyBean, getActualBeanReference, isManaged, isProxyReference
 

Method Detail

destroyBean

void destroyBean(Object ref,
                 Runnable runnable)
Destroy the bean and all other beans associated with its AsyncCreationalContext. Because some destruction activity may be asynchronous, this method accepts a second parameter as a callback to be notified when the destruction of all the beans has been done.

Parameters:
ref - the reference to the bean to be destroyed.
runnable - a runnable callback to be called when all the beans have been destroyed.

lookupBeans

Collection<AsyncBeanDef> lookupBeans(String name)
Looks up all beans with the specified bean name as specified by Named.

Parameters:
name - the name of bean to lookup
Returns:
and unmodifiable list of all beans with the specified name.

lookupBeans

<T> Collection<AsyncBeanDef<T>> lookupBeans(Class<T> type)
Looks up all beans of the specified type.

Parameters:
type - The type of the bean
Returns:
An unmodifiable list of all the beans that match the specified type. Returns an empty list if there is no matching type.

lookupBeans

<T> Collection<AsyncBeanDef<T>> lookupBeans(Class<T> type,
                                            Annotation... qualifiers)
Looks up a bean reference based on type and qualifiers. Returns null if there is no type associated with the specified

Parameters:
type - The type of the bean
qualifiers - qualifiers to match
Returns:
An unmodifiable list of all beans which match the specified type and qualifiers. Returns an empty list if no beans match.

lookupBean

<T> AsyncBeanDef<T> lookupBean(Class<T> type,
                               Annotation... qualifiers)
Looks up a bean reference based on type and qualifiers. Returns null if there is no type associated with the specified

Type Parameters:
T - The type of the bean
Parameters:
type - The type of the bean
qualifiers - qualifiers to match
Returns:
An instance of the IOCSingletonBean for the matching type and qualifiers. Throws an IOCResolutionException if there is a matching type but none of the qualifiers match or if more than one bean matches.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.