Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.client.container.async
Interface AsyncBeanDef<T>

All Known Implementing Classes:
AbstractAsyncBean, AsyncDependentBean, AsyncSingletonBean

public interface AsyncBeanDef<T>

Author:
Mike Brock

Method Summary
 Class<?> getBeanClass()
          Returns the actual bean class represented by this bean.
 void getInstance(CreationalCallback<T> callback)
          Returns an instance of the bean within the active scope.
 void getInstance(CreationalCallback<T> callback, AsyncCreationalContext context)
          Returns an instance of the bean within the active scope, using the specified SimpleCreationalContext.
 String getName()
          Returns the name of the bean.
 Set<Annotation> getQualifiers()
          Returns any qualifiers associated with the bean.
 Class<? extends Annotation> getScope()
          Returns the scope of the bean.
 Class<T> getType()
          Returns the type of the bean.
 boolean isActivated()
          Returns true if the bean is activated.
 boolean isConcrete()
          Returns true if the bean is a concrete bean definition and not an interface or abstract type.
 boolean matches(Set<Annotation> annotations)
          Returns true if the beans qualifiers match the specified set of qualifiers.
 void newInstance(CreationalCallback<T> callback)
          Returns a new instance of the bean.
 

Method Detail

getType

Class<T> getType()
Returns the type of the bean.

Returns:
the type of the bean.
See Also:
getBeanClass()

getBeanClass

Class<?> getBeanClass()
Returns the actual bean class represented by this bean.

Returns:
the actual type of the bean.

getScope

Class<? extends Annotation> getScope()
Returns the scope of the bean.


getInstance

void getInstance(CreationalCallback<T> callback)
Returns an instance of the bean within the active scope.


getInstance

void getInstance(CreationalCallback<T> callback,
                 AsyncCreationalContext context)
Returns an instance of the bean within the active scope, using the specified SimpleCreationalContext.

Parameters:
context -

newInstance

void newInstance(CreationalCallback<T> callback)
Returns a new instance of the bean. Calling this method overrides the underlying scope and instantiates a new instance of the bean.


getQualifiers

Set<Annotation> getQualifiers()
Returns any qualifiers associated with the bean.

Returns:

matches

boolean matches(Set<Annotation> annotations)
Returns true if the beans qualifiers match the specified set of qualifiers.

Parameters:
annotations - the qualifiers to compare
Returns:
returns whether or not the bean matches the set of qualifiers

getName

String getName()
Returns the name of the bean.

Returns:
the name of the bean. If the bean does not have a name, returns null.

isConcrete

boolean isConcrete()
Returns true if the bean is a concrete bean definition and not an interface or abstract type.

Returns:
true if concrete.

isActivated

boolean isActivated()
Returns true if the bean is activated. All managed beans are activated by default unless a BeanActivator was specified using ActivatedBy which will be consulted when invoking this method.

Returns:
true if activated, otherwise false.

Errai 3.0.1-SNAPSHOT

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