|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.weld.BeanManagerImpl
public class BeanManagerImpl
Implementation of the Bean Manager. Essentially a singleton for registering Beans, Contexts, Observers, Interceptors etc. as well as providing resolution
| Field Summary | |
|---|---|
static java.lang.String |
JNDI_KEY
|
| Method Summary | ||
|---|---|---|
void |
addAccessibleBeanManager(BeanManagerImpl accessibleBeanManager)
|
|
void |
addBean(javax.enterprise.inject.spi.Bean<?> bean)
|
|
void |
addContext(javax.enterprise.context.spi.Context context)
|
|
void |
addDecorator(DecoratorImpl<?> bean)
|
|
void |
addInterceptor(InterceptorImpl<?> bean)
|
|
void |
addObserver(javax.enterprise.inject.spi.ObserverMethod<?,?> observer)
Does the actual observer registration |
|
void |
cleanup()
|
|
BeanManagerImpl |
createActivity()
|
|
|
createAnnotatedType(java.lang.Class<T> type)
|
|
|
createCreationalContext(javax.enterprise.context.spi.Contextual<T> contextual)
|
|
|
createInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<T> type)
|
|
|
createInjectionTarget(org.jboss.weld.ejb.spi.EjbDescriptor<T> descriptor)
|
|
void |
fireEvent(java.lang.Object event,
java.lang.annotation.Annotation... qualifiers)
Fires an event object with given event object for given bindings |
|
void |
fireEvent(java.lang.reflect.Type eventType,
java.lang.Object event,
java.lang.annotation.Annotation... qualifiers)
|
|
java.lang.Iterable<javax.enterprise.inject.spi.Bean<?>> |
getAccessibleBeans()
|
|
protected java.util.Set<BeanManagerImpl> |
getAccessibleManagers()
|
|
java.lang.Iterable<java.lang.String> |
getAccessibleNamespaces()
|
|
|
getBean(org.jboss.weld.ejb.spi.EjbDescriptor<T> descriptor)
|
|
|
getBean(WeldAnnotated<T,?> element,
java.lang.annotation.Annotation... bindings)
|
|
TypeSafeBeanResolver<javax.enterprise.inject.spi.Bean<?>> |
getBeanResolver()
Get the web bean resolver. |
|
java.util.List<javax.enterprise.inject.spi.Bean<?>> |
getBeans()
The beans registered with the Web Bean manager which are resolvable. |
|
java.util.Set<javax.enterprise.inject.spi.Bean<?>> |
getBeans(java.lang.String name)
|
|
java.util.Set<javax.enterprise.inject.spi.Bean<?>> |
getBeans(java.lang.reflect.Type beanType,
java.lang.annotation.Annotation... bindings)
|
|
java.util.Set<javax.enterprise.inject.spi.Bean<?>> |
getBeans(WeldAnnotated<?,?> element,
java.lang.annotation.Annotation... bindings)
|
|
org.jboss.interceptor.registry.InterceptorRegistry<java.lang.Class<?>,SerializableContextual<javax.enterprise.inject.spi.Interceptor<?>,?>> |
getBoundInterceptorsRegistry()
|
|
java.util.concurrent.atomic.AtomicInteger |
getChildIds()
|
|
protected ClientProxyProvider |
getClientProxyProvider()
|
|
javax.enterprise.context.spi.Context |
getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Gets an active context of the given scope. |
|
protected com.google.common.collect.ListMultimap<java.lang.Class<? extends java.lang.annotation.Annotation>,javax.enterprise.context.spi.Context> |
getContexts()
|
|
BeanManagerImpl |
getCurrent()
|
|
javax.enterprise.inject.spi.InjectionPoint |
getCurrentInjectionPoint()
The injection point being operated on for this thread |
|
org.jboss.interceptor.registry.InterceptorRegistry<java.lang.Class<?>,java.lang.Class<?>> |
getDeclaredInterceptorsRegistry()
|
|
java.util.List<DecoratorImpl<?>> |
getDecorators()
|
|
|
getEjbDescriptor(java.lang.String beanName)
|
|
javax.el.ELResolver |
getELResolver()
|
|
java.util.List<java.lang.Class<?>> |
getEnabledDecoratorClasses()
|
|
java.util.List<java.lang.Class<?>> |
getEnabledInterceptorClasses()
|
|
java.util.Collection<java.lang.Class<?>> |
getEnabledPolicyClasses()
A collection of enabled policy classes |
|
java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getEnabledPolicyStereotypes()
|
|
java.util.Map<org.jboss.weld.ejb.spi.EjbDescriptor<?>,SessionBean<?>> |
getEnterpriseBeans()
Gets the class-mapped beans. |
|
java.lang.String |
getId()
|
|
java.util.Set<javax.enterprise.inject.spi.Bean<?>> |
getInjectableBeans(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
|
|
java.lang.Object |
getInjectableReference(javax.enterprise.inject.spi.InjectionPoint injectionPoint,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
|
|
|
getInstanceByType(java.lang.Class<T> beanType,
java.lang.annotation.Annotation... bindings)
Deprecated. |
|
java.util.Set<java.lang.annotation.Annotation> |
getInterceptorBindingTypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType)
|
|
java.util.List<InterceptorImpl<?>> |
getInterceptors()
|
|
|
getMostSpecializedBean(javax.enterprise.inject.spi.Bean<X> bean)
|
|
protected java.util.List<java.lang.String> |
getNamespaces()
|
|
java.util.List<javax.enterprise.inject.spi.ObserverMethod<?,?>> |
getObservers()
|
|
javax.enterprise.inject.spi.Bean<?> |
getPassivationCapableBean(java.lang.String id)
|
|
java.lang.Object |
getReference(javax.enterprise.inject.spi.Bean<?> bean,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
|
|
java.lang.Object |
getReference(javax.enterprise.inject.spi.Bean<?> bean,
java.lang.reflect.Type beanType,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
|
|
java.lang.Object |
getReference(javax.enterprise.inject.spi.InjectionPoint injectionPoint,
javax.enterprise.inject.spi.Bean<?> resolvedBean,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
Get a reference, registering the injection point used. |
|
Namespace |
getRootNamespace()
|
|
org.jboss.weld.bootstrap.api.ServiceRegistry |
getServices()
|
|
java.util.Map<javax.enterprise.context.spi.Contextual<?>,javax.enterprise.context.spi.Contextual<?>> |
getSpecializedBeans()
|
|
java.util.Set<java.lang.annotation.Annotation> |
getStereotypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
|
|
boolean |
isBeanEnabled(javax.enterprise.inject.spi.Bean<?> bean)
|
|
boolean |
isInterceptorBindingType(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
|
boolean |
isNormalScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
|
boolean |
isPassivatingScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
|
boolean |
isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
|
boolean |
isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
|
boolean |
isStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
|
static BeanManagerImpl |
newChildActivityManager(BeanManagerImpl parentManager)
Create a new child manager |
|
static BeanManagerImpl |
newManager(BeanManagerImpl rootManager,
java.lang.String id,
org.jboss.weld.bootstrap.api.ServiceRegistry services)
Create a new, root, manager |
|
static BeanManagerImpl |
newRootManager(java.lang.String id,
org.jboss.weld.bootstrap.api.ServiceRegistry serviceRegistry)
Create a new, root, manager |
|
protected java.lang.Object |
readResolve()
|
|
protected void |
registerBeanNamespace(javax.enterprise.inject.spi.Bean<?> bean)
|
|
javax.enterprise.inject.spi.InjectionPoint |
replaceOrPushCurrentInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Replaces (or adds) the current injection point. |
|
|
resolve(java.util.Set<javax.enterprise.inject.spi.Bean<? extends X>> beans)
|
|
java.util.List<javax.enterprise.inject.spi.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 |
|
java.util.List<javax.enterprise.inject.spi.Decorator<?>> |
resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
java.util.Set<java.lang.annotation.Annotation> bindings)
|
|
java.util.List<javax.enterprise.inject.spi.Interceptor<?>> |
resolveInterceptors(javax.enterprise.inject.spi.InterceptionType type,
java.lang.annotation.Annotation... interceptorBindings)
Resolves a list of interceptors based on interception type and interceptor bindings |
|
|
resolveObserverMethods(T event,
java.lang.annotation.Annotation... bindings)
|
|
BeanManagerImpl |
setCurrent(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
|
|
void |
setEnabledDecoratorClasses(java.util.List<java.lang.Class<?>> enabledDecoratorClasses)
|
|
void |
setEnabledInterceptorClasses(java.util.List<java.lang.Class<?>> enabledInterceptorClasses)
|
|
void |
setEnabledPolicyClasses(java.util.Collection<java.lang.Class<?>> enabledPolicyClasses)
|
|
void |
setEnabledPolicyStereotypes(java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> enabledPolicySterotypes)
|
|
java.lang.String |
toString()
Gets a string representation |
|
void |
validate(javax.enterprise.inject.spi.InjectionPoint ij)
|
|
javax.el.ExpressionFactory |
wrapExpressionFactory(javax.el.ExpressionFactory expressionFactory)
|
|
| 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
| Method Detail |
|---|
public static BeanManagerImpl newRootManager(java.lang.String id,
org.jboss.weld.bootstrap.api.ServiceRegistry serviceRegistry)
serviceRegistry -
public static BeanManagerImpl newManager(BeanManagerImpl rootManager,
java.lang.String id,
org.jboss.weld.bootstrap.api.ServiceRegistry services)
serviceRegistry -
public static BeanManagerImpl newChildActivityManager(BeanManagerImpl parentManager)
parentManager -
public void addAccessibleBeanManager(BeanManagerImpl accessibleBeanManager)
protected java.util.Set<BeanManagerImpl> getAccessibleManagers()
public void addBean(javax.enterprise.inject.spi.Bean<?> bean)
addBean in interface javax.enterprise.inject.spi.BeanManagerpublic void addDecorator(DecoratorImpl<?> bean)
public <T> java.util.Set<javax.enterprise.inject.spi.ObserverMethod<?,T>> resolveObserverMethods(T event,
java.lang.annotation.Annotation... bindings)
resolveObserverMethods in interface javax.enterprise.inject.spi.BeanManagerpublic void addInterceptor(InterceptorImpl<?> bean)
public java.util.Collection<java.lang.Class<?>> getEnabledPolicyClasses()
public java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> getEnabledPolicyStereotypes()
public boolean isBeanEnabled(javax.enterprise.inject.spi.Bean<?> bean)
public java.util.List<java.lang.Class<?>> getEnabledDecoratorClasses()
public java.util.List<java.lang.Class<?>> getEnabledInterceptorClasses()
public void setEnabledPolicyClasses(java.util.Collection<java.lang.Class<?>> enabledPolicyClasses)
public void setEnabledPolicyStereotypes(java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> enabledPolicySterotypes)
public void setEnabledDecoratorClasses(java.util.List<java.lang.Class<?>> enabledDecoratorClasses)
public void setEnabledInterceptorClasses(java.util.List<java.lang.Class<?>> enabledInterceptorClasses)
public java.util.Set<javax.enterprise.inject.spi.Bean<?>> getBeans(java.lang.reflect.Type beanType,
java.lang.annotation.Annotation... bindings)
getBeans in interface javax.enterprise.inject.spi.BeanManager
public java.util.Set<javax.enterprise.inject.spi.Bean<?>> getBeans(WeldAnnotated<?,?> element,
java.lang.annotation.Annotation... bindings)
public java.util.Set<javax.enterprise.inject.spi.Bean<?>> getInjectableBeans(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
protected void registerBeanNamespace(javax.enterprise.inject.spi.Bean<?> bean)
public java.util.Map<org.jboss.weld.ejb.spi.EjbDescriptor<?>,SessionBean<?>> getEnterpriseBeans()
public java.util.List<javax.enterprise.inject.spi.Bean<?>> getBeans()
public java.util.List<DecoratorImpl<?>> getDecorators()
public java.util.List<InterceptorImpl<?>> getInterceptors()
public java.lang.Iterable<javax.enterprise.inject.spi.Bean<?>> getAccessibleBeans()
public void addContext(javax.enterprise.context.spi.Context context)
public void addObserver(javax.enterprise.inject.spi.ObserverMethod<?,?> observer)
observer - =
public void fireEvent(java.lang.Object event,
java.lang.annotation.Annotation... qualifiers)
fireEvent in interface javax.enterprise.inject.spi.BeanManagerevent - The event object to pass alongbindings - The binding types to matchBeanManager.fireEvent(java.lang.Object,
java.lang.annotation.Annotation[])
public void fireEvent(java.lang.reflect.Type eventType,
java.lang.Object event,
java.lang.annotation.Annotation... qualifiers)
public javax.enterprise.context.spi.Context getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
getContext in interface javax.enterprise.inject.spi.BeanManagerscopeType - The scope to match
BeanManager.getContext(java.lang.Class)
public java.lang.Object getReference(javax.enterprise.inject.spi.Bean<?> bean,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
public java.lang.Object getReference(javax.enterprise.inject.spi.Bean<?> bean,
java.lang.reflect.Type beanType,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
getReference in interface javax.enterprise.inject.spi.BeanManager
public java.lang.Object getReference(javax.enterprise.inject.spi.InjectionPoint injectionPoint,
javax.enterprise.inject.spi.Bean<?> resolvedBean,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
injectionPoint - the injection point to registerresolvedBean - the bean to get a reference tocreationalContext - the creationalContext
public java.lang.Object getInjectableReference(javax.enterprise.inject.spi.InjectionPoint injectionPoint,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
getInjectableReference in interface javax.enterprise.inject.spi.BeanManager
@Deprecated
public <T> T getInstanceByType(java.lang.Class<T> beanType,
java.lang.annotation.Annotation... bindings)
beanType - The API type to matchbindings - The binding types to match
public <T> javax.enterprise.inject.spi.Bean<T> getBean(WeldAnnotated<T,?> element,
java.lang.annotation.Annotation... bindings)
public java.util.Set<javax.enterprise.inject.spi.Bean<?>> getBeans(java.lang.String name)
getBeans in interface javax.enterprise.inject.spi.BeanManager
public java.util.List<javax.enterprise.inject.spi.Decorator<?>> resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
java.lang.annotation.Annotation... bindings)
resolveDecorators in interface javax.enterprise.inject.spi.BeanManagertypes - The set of API types to matchbindings - The binding types to match
BeanManager.resolveDecorators(java.util.Set,
java.lang.annotation.Annotation[])
public java.util.List<javax.enterprise.inject.spi.Decorator<?>> resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
java.util.Set<java.lang.annotation.Annotation> bindings)
public java.util.List<javax.enterprise.inject.spi.Interceptor<?>> resolveInterceptors(javax.enterprise.inject.spi.InterceptionType type,
java.lang.annotation.Annotation... interceptorBindings)
resolveInterceptors in interface javax.enterprise.inject.spi.BeanManagertype - The interception type to resolveinterceptorBindings - The binding types to match
BeanManager.resolveInterceptors(javax.enterprise.inject.spi.InterceptionType,
java.lang.annotation.Annotation[])public TypeSafeBeanResolver<javax.enterprise.inject.spi.Bean<?>> getBeanResolver()
public java.lang.String toString()
toString in class java.lang.Objectpublic BeanManagerImpl createActivity()
createActivity in interface org.jboss.weld.manager.api.WeldManagerpublic BeanManagerImpl setCurrent(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
setCurrent in interface org.jboss.weld.manager.api.WeldManagerpublic BeanManagerImpl getCurrent()
public org.jboss.weld.bootstrap.api.ServiceRegistry getServices()
getServices in interface org.jboss.weld.manager.api.WeldManagerpublic javax.enterprise.inject.spi.InjectionPoint getCurrentInjectionPoint()
public javax.enterprise.inject.spi.InjectionPoint replaceOrPushCurrentInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
injectionPoint - the injection point to use
public java.util.Map<javax.enterprise.context.spi.Contextual<?>,javax.enterprise.context.spi.Contextual<?>> getSpecializedBeans()
protected java.lang.Object readResolve()
protected ClientProxyProvider getClientProxyProvider()
protected com.google.common.collect.ListMultimap<java.lang.Class<? extends java.lang.annotation.Annotation>,javax.enterprise.context.spi.Context> getContexts()
protected java.util.List<java.lang.String> getNamespaces()
public java.lang.Iterable<java.lang.String> getAccessibleNamespaces()
public java.lang.String getId()
public java.util.concurrent.atomic.AtomicInteger getChildIds()
public java.util.List<javax.enterprise.inject.spi.ObserverMethod<?,?>> getObservers()
public Namespace getRootNamespace()
public <T> javax.enterprise.inject.spi.InjectionTarget<T> createInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<T> type)
createInjectionTarget in interface javax.enterprise.inject.spi.BeanManagerpublic <T> javax.enterprise.inject.spi.InjectionTarget<T> createInjectionTarget(org.jboss.weld.ejb.spi.EjbDescriptor<T> descriptor)
createInjectionTarget in interface org.jboss.weld.manager.api.WeldManagerpublic <X> javax.enterprise.inject.spi.Bean<? extends X> getMostSpecializedBean(javax.enterprise.inject.spi.Bean<X> bean)
getMostSpecializedBean in interface javax.enterprise.inject.spi.BeanManagerpublic void validate(javax.enterprise.inject.spi.InjectionPoint ij)
validate in interface javax.enterprise.inject.spi.BeanManagerpublic java.util.Set<java.lang.annotation.Annotation> getInterceptorBindingTypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType)
getInterceptorBindingTypeDefinition in interface javax.enterprise.inject.spi.BeanManagerpublic javax.enterprise.inject.spi.Bean<?> getPassivationCapableBean(java.lang.String id)
getPassivationCapableBean in interface javax.enterprise.inject.spi.BeanManagerpublic java.util.Set<java.lang.annotation.Annotation> getStereotypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
getStereotypeDefinition in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isQualifier in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isInterceptorBindingType(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isInterceptorBindingType in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isNormalScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isNormalScope in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isPassivatingScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isPassivatingScope in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isScope in interface javax.enterprise.inject.spi.BeanManagerpublic boolean isStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isStereotype in interface javax.enterprise.inject.spi.BeanManagerpublic javax.el.ELResolver getELResolver()
getELResolver in interface javax.enterprise.inject.spi.BeanManagerpublic javax.el.ExpressionFactory wrapExpressionFactory(javax.el.ExpressionFactory expressionFactory)
wrapExpressionFactory in interface javax.enterprise.inject.spi.BeanManagerpublic <T> WeldCreationalContext<T> createCreationalContext(javax.enterprise.context.spi.Contextual<T> contextual)
createCreationalContext in interface javax.enterprise.inject.spi.BeanManagerpublic <T> javax.enterprise.inject.spi.AnnotatedType<T> createAnnotatedType(java.lang.Class<T> type)
createAnnotatedType in interface javax.enterprise.inject.spi.BeanManagerpublic <X> javax.enterprise.inject.spi.Bean<? extends X> resolve(java.util.Set<javax.enterprise.inject.spi.Bean<? extends X>> beans)
resolve in interface javax.enterprise.inject.spi.BeanManagerpublic <T> org.jboss.weld.ejb.spi.EjbDescriptor<T> getEjbDescriptor(java.lang.String beanName)
getEjbDescriptor in interface org.jboss.weld.manager.api.WeldManagerpublic <T> SessionBean<T> getBean(org.jboss.weld.ejb.spi.EjbDescriptor<T> descriptor)
getBean in interface org.jboss.weld.manager.api.WeldManagerpublic void cleanup()
public org.jboss.interceptor.registry.InterceptorRegistry<java.lang.Class<?>,SerializableContextual<javax.enterprise.inject.spi.Interceptor<?>,?>> getBoundInterceptorsRegistry()
public org.jboss.interceptor.registry.InterceptorRegistry<java.lang.Class<?>,java.lang.Class<?>> getDeclaredInterceptorsRegistry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||