|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.webbeans.ManagerImpl
public class ManagerImpl
Implementation of the Web Beans Manager. Essentially a singleton for registering Beans, Contexts, Observers, Interceptors etc. as well as providing resolution
| Field Summary | |
|---|---|
static java.lang.String |
JNDI_KEY
|
| Constructor Summary | |
|---|---|
ManagerImpl(NamingContext namingContext,
EjbResolver ejbResolver,
ResourceLoader resourceLoader)
Create a new manager |
|
| Method Summary | ||
|---|---|---|
Manager |
addBean(Bean<?> bean)
Registers a bean with the manager |
|
Manager |
addContext(Context context)
Registers a context with the manager |
|
Manager |
addDecorator(Decorator decorator)
Registers a decorator with the manager |
|
Manager |
addInterceptor(Interceptor interceptor)
Registers an interceptor with the manager |
|
|
addObserver(Observer<T> observer,
java.lang.Class<T> eventType,
java.lang.annotation.Annotation... bindings)
Registers an observer for a given event type and binding types |
|
|
addObserver(Observer<T> observer,
TypeLiteral<T> eventType,
java.lang.annotation.Annotation... bindings)
Registers an observer for a given event type literal and binding types |
|
|
addObserver(ObserverImpl<T> observer)
|
|
protected void |
checkEnabledDeploymentTypes()
Set up the enabled deployment types, if none are specified by the user, the default @Production and @Standard are used. |
|
Manager |
createActivity()
|
|
void |
fireEvent(java.lang.Object event,
java.lang.annotation.Annotation... bindings)
Fires an event object with given event object for given bindings |
|
|
getBeanByType(AnnotatedItem<T,?> element,
java.lang.annotation.Annotation... bindings)
|
|
java.util.List<Bean<?>> |
getBeans()
The beans registered with the Web Bean manager. |
|
Context |
getBuiltInContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Direct access to built in contexts. |
|
Context |
getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Gets an active context of the given scope. |
|
EjbDescriptorCache |
getEjbDescriptorCache()
|
|
EjbResolver |
getEjbResolver()
|
|
java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getEnabledDeploymentTypes()
A strongly ordered, unmodifiable list of enabled deployment types |
|
java.util.Map<java.lang.Class<?>,EnterpriseBean<?>> |
getEnterpriseBeanMap()
|
|
InjectionPoint |
getInjectionPoint()
Accesses the factory used to create each instance of InjectionPoint that is injected into web beans. |
|
|
getInstance(Bean<T> bean)
Returns an instance of a bean |
|
|
getInstance(Bean<T> bean,
boolean create)
|
|
java.lang.Object |
getInstanceByName(java.lang.String name)
Gets an instance by name, returning null if none is found and throwing an exception if too many beans match |
|
|
getInstanceByType(java.lang.Class<T> type,
java.lang.annotation.Annotation... bindings)
Returns an instance by API type and binding types |
|
|
getInstanceByType(TypeLiteral<T> type,
java.lang.annotation.Annotation... bindings)
Returns an instance by type literal and binding types |
|
|
getInstanceToInject(InjectionPoint injectionPoint)
|
|
|
getInstanceToInject(InjectionPoint injectionPoint,
CreationalContext<?> creationalContext)
|
|
NamingContext |
getNaming()
|
|
java.util.Map<java.lang.Class<?>,EnterpriseBean<?>> |
getNewEnterpriseBeanMap()
Gets the class-mapped beans. |
|
Resolver |
getResolver()
Get the web bean resolver. |
|
ResourceLoader |
getResourceLoader()
|
|
java.util.Map<Bean<?>,Bean<?>> |
getSpecializedBeans()
|
|
Manager |
parse(java.io.InputStream xmlStream)
|
|
protected java.lang.Object |
readResolve()
|
|
|
removeObserver(Observer<T> observer,
java.lang.Class<T> eventType,
java.lang.annotation.Annotation... bindings)
Removes an observer |
|
|
removeObserver(Observer<T> observer,
TypeLiteral<T> eventType,
java.lang.annotation.Annotation... bindings)
Removes an observer |
|
java.util.Set<Bean<?>> |
resolveByName(java.lang.String name)
Resolves a set of beans based on their name |
|
|
resolveByType(AnnotatedItem<T,?> element,
java.lang.annotation.Annotation... bindings)
Check the resolution request is valid, and then ask the resolver to perform the resolution. |
|
|
resolveByType(java.lang.Class<T> type,
java.lang.annotation.Annotation... bindings)
Resolves beans by API type and binding types |
|
|
resolveByType(TypeLiteral<T> type,
java.lang.annotation.Annotation... bindings)
Resolves beans by API type literal and binding types |
|
java.util.List<Decorator> |
resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
java.lang.annotation.Annotation... bindings)
Resolves a list of decorators based on API types and binding types Os |
|
|
resolveDisposalMethods(java.lang.Class<T> apiType,
java.lang.annotation.Annotation... bindings)
Resolve the disposal method for the given producer method. |
|
java.util.List<Interceptor> |
resolveInterceptors(InterceptionType type,
java.lang.annotation.Annotation... interceptorBindings)
Resolves a list of interceptors based on interception type and interceptor bindings |
|
|
resolveObservers(T event,
java.lang.annotation.Annotation... bindings)
Resolves observers for given event and bindings |
|
void |
setBeans(java.util.Set<RIBean<?>> beans)
Wraps a collection of beans into a thread safe list. |
|
Manager |
setCurrent(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
|
|
void |
setEnabledDeploymentTypes(java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> enabledDeploymentTypes)
Set the enabled deployment types |
|
java.lang.String |
toString()
Gets a string representation |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String JNDI_KEY
| Constructor Detail |
|---|
public ManagerImpl(NamingContext namingContext,
EjbResolver ejbResolver,
ResourceLoader resourceLoader)
ejbResolver - the ejbResolver to use| Method Detail |
|---|
protected void checkEnabledDeploymentTypes()
enabledDeploymentTypes - The enabled deployment types from
web-beans.xmlpublic Manager addBean(Bean<?> bean)
addBean in interface Managerbean - The bean to register
Manager.addBean(javax.inject.manager.Bean)
public <T> java.util.Set<AnnotatedMethod<?>> resolveDisposalMethods(java.lang.Class<T> apiType,
java.lang.annotation.Annotation... bindings)
apiType - The API type to matchbindingTypes - The binding types to match
public <T> java.util.Set<Observer<T>> resolveObservers(T event,
java.lang.annotation.Annotation... bindings)
resolveObservers in interface Managerevent - The event to matchbindings - The binding types to match
Manager.resolveObservers(java.lang.Object,
java.lang.annotation.Annotation[])public java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getEnabledDeploymentTypes()
public void setEnabledDeploymentTypes(java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> enabledDeploymentTypes)
enabledDeploymentTypes -
public <T> java.util.Set<Bean<T>> resolveByType(java.lang.Class<T> type,
java.lang.annotation.Annotation... bindings)
resolveByType in interface Managertype - The API type to matchbindingTypes - The binding types to match
Manager.resolveByType(java.lang.Class,
java.lang.annotation.Annotation[])
public <T> java.util.Set<Bean<T>> resolveByType(TypeLiteral<T> type,
java.lang.annotation.Annotation... bindings)
resolveByType in interface Managertype - The API type literal to matchbindingTypes - The binding types to match
Manager.resolveByType(javax.inject.TypeLiteral,
java.lang.annotation.Annotation[])
public <T> java.util.Set<Bean<T>> resolveByType(AnnotatedItem<T,?> element,
java.lang.annotation.Annotation... bindings)
element - The item to resolvebindingTypes - The binding types to match
public void setBeans(java.util.Set<RIBean<?>> beans)
beans - The set of beans to addpublic java.util.Map<java.lang.Class<?>,EnterpriseBean<?>> getNewEnterpriseBeanMap()
public java.util.Map<java.lang.Class<?>,EnterpriseBean<?>> getEnterpriseBeanMap()
public java.util.List<Bean<?>> getBeans()
public Manager addContext(Context context)
addContext in interface Managercontext - The context to add
Manager.addContext(javax.context.Context)public Manager addDecorator(Decorator decorator)
addDecorator in interface Managerdecorator - The decorator to register
Manager.addDecorator(javax.inject.manager.Decorator)public Manager addInterceptor(Interceptor interceptor)
addInterceptor in interface Managerinterceptor - The interceptor to register
Manager.addInterceptor(javax.inject.manager.Interceptor)
public <T> Manager addObserver(Observer<T> observer,
java.lang.Class<T> eventType,
java.lang.annotation.Annotation... bindings)
addObserver in interface Managerobserver - The observer to registereventType - The event type to matchbindings - The bindings to match
Manager.addObserver(javax.event.Observer,
java.lang.Class, java.lang.annotation.Annotation[])public <T> Manager addObserver(ObserverImpl<T> observer)
public <T> Manager addObserver(Observer<T> observer,
TypeLiteral<T> eventType,
java.lang.annotation.Annotation... bindings)
addObserver in interface Managerobserver - The observer to registereventType - The event type literal to matchbindings - The bindings to match
Manager.addObserver(javax.event.Observer,
javax.inject.TypeLiteral, java.lang.annotation.Annotation[])
public void fireEvent(java.lang.Object event,
java.lang.annotation.Annotation... bindings)
fireEvent in interface Managerevent - The event object to pass alongbindings - The binding types to matchManager.fireEvent(java.lang.Object,
java.lang.annotation.Annotation[])public Context getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
getContext in interface ManagerscopeType - The scope to match
Manager.getContext(java.lang.Class)public Context getBuiltInContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
scopeType - The scope type of the context
public <T> T getInstance(Bean<T> bean)
getInstance in interface Managerbean - The bean to instantiate
Manager.getInstance(javax.inject.manager.Bean)
public <T> T getInstance(Bean<T> bean,
boolean create)
public <T> T getInstanceToInject(InjectionPoint injectionPoint)
getInstanceToInject in interface Manager
public <T> T getInstanceToInject(InjectionPoint injectionPoint,
CreationalContext<?> creationalContext)
getInstanceToInject in interface Managerpublic java.lang.Object getInstanceByName(java.lang.String name)
getInstanceByName in interface Managername - The name to match
Manager.getInstanceByName(java.lang.String)
public <T> T getInstanceByType(java.lang.Class<T> type,
java.lang.annotation.Annotation... bindings)
getInstanceByType in interface Managertype - The API type to matchbindingTypes - The binding types to match
Manager.getInstanceByType(java.lang.Class,
java.lang.annotation.Annotation[])
public <T> T getInstanceByType(TypeLiteral<T> type,
java.lang.annotation.Annotation... bindings)
getInstanceByType in interface Managertype - The type to matchbindingTypes - The binding types to match
Manager.getInstanceByType(javax.inject.TypeLiteral,
java.lang.annotation.Annotation[])
public <T> Bean<T> getBeanByType(AnnotatedItem<T,?> element,
java.lang.annotation.Annotation... bindings)
public <T> Manager removeObserver(Observer<T> observer,
java.lang.Class<T> eventType,
java.lang.annotation.Annotation... bindings)
removeObserver in interface Managerobserver - The observer to removeeventType - The event type to matchbindings - the binding types to match
Manager.removeObserver(javax.event.Observer,
java.lang.Class, java.lang.annotation.Annotation[])
public <T> Manager removeObserver(Observer<T> observer,
TypeLiteral<T> eventType,
java.lang.annotation.Annotation... bindings)
removeObserver in interface Managerobserver - The observer to removeeventType - The event type to matchbindings - the binding types to match
Manager.removeObserver(javax.event.Observer,
javax.inject.TypeLiteral, java.lang.annotation.Annotation[])public java.util.Set<Bean<?>> resolveByName(java.lang.String name)
resolveByName in interface ManagerThe - name to match
Manager.resolveByName(java.lang.String)
public java.util.List<Decorator> resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
java.lang.annotation.Annotation... bindings)
resolveDecorators in interface Managertypes - The set of API types to matchbindingTypes - The binding types to match
Manager.resolveDecorators(java.util.Set,
java.lang.annotation.Annotation[])
public java.util.List<Interceptor> resolveInterceptors(InterceptionType type,
java.lang.annotation.Annotation... interceptorBindings)
resolveInterceptors in interface Managertype - The interception type to resolveinterceptorBindings - The binding types to match
Manager.resolveInterceptors(javax.inject.manager.InterceptionType,
java.lang.annotation.Annotation[])public Resolver getResolver()
public EjbDescriptorCache getEjbDescriptorCache()
public java.lang.String toString()
toString in class java.lang.Objectpublic Manager parse(java.io.InputStream xmlStream)
parse in interface Managerpublic Manager createActivity()
createActivity in interface Managerpublic Manager setCurrent(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
setCurrent in interface Managerpublic NamingContext getNaming()
public EjbResolver getEjbResolver()
public ResourceLoader getResourceLoader()
public InjectionPoint getInjectionPoint()
public java.util.Map<Bean<?>,Bean<?>> getSpecializedBeans()
protected java.lang.Object readResolve()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||