org.jboss.weld.manager.api
Interface WeldManager

All Superinterfaces:
javax.enterprise.inject.spi.BeanManager, Serializable

public interface WeldManager
extends javax.enterprise.inject.spi.BeanManager, Serializable

Functionality provided by the Weld Manager over and above the JSR-299 Manager.

Author:
Pete Muir

Method Summary
 WeldManager createActivity()
          Create a new child activity.
<T> javax.enterprise.inject.spi.InjectionTarget<T>
createInjectionTarget(EjbDescriptor<T> descriptor)
          The injection target for the given EJB, or null if Weld was not given this descriptor in the deployment.
<X> javax.enterprise.inject.spi.InjectionTarget<X>
fireProcessInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<X> type)
          Fire a ProcessInjectionTarget event for the given type.
<T> javax.enterprise.inject.spi.Bean<T>
getBean(EjbDescriptor<T> descriptor)
          Get the Bean object for the given EJB, or null if Weld was not given this descriptor in the deployment.
 WeldManager getCurrent()
           
<T> EjbDescriptor<T>
getEjbDescriptor(String ejbName)
          Get the EjbDescriptor for the given ejb name
 String getId()
          The ID of the manager, identical to the ID provided by the BDA
 ServiceRegistry getServices()
          Get the services registered for this manager
 javax.enterprise.inject.Instance<Object> instance()
           
 WeldManager setCurrent(Class<? extends Annotation> scopeType)
          Associate an activity with the current context for a normal scope
 
Methods inherited from interface javax.enterprise.inject.spi.BeanManager
createAnnotatedType, createCreationalContext, createInjectionTarget, fireEvent, getBeans, getBeans, getContext, getELResolver, getInjectableReference, getInterceptorBindingDefinition, getPassivationCapableBean, getReference, getStereotypeDefinition, isInterceptorBinding, isNormalScope, isPassivatingScope, isQualifier, isScope, isStereotype, resolve, resolveDecorators, resolveInterceptors, resolveObserverMethods, validate, wrapExpressionFactory
 

Method Detail

createActivity

WeldManager createActivity()
Create a new child activity. A child activity inherits all beans, interceptors, decorators, observers, and contexts defined by its direct and indirect parent activities. This method should not be called by the application.

Returns:
the child activity

setCurrent

WeldManager setCurrent(Class<? extends Annotation> scopeType)
Associate an activity with the current context for a normal scope

Parameters:
scopeType - the scope to associate the activity with
Returns:
the activity
Throws:
javax.enterprise.context.ContextNotActiveException - if the given scope is inactive
IllegalArgumentException - if the given scope is not a normal scope

createInjectionTarget

<T> javax.enterprise.inject.spi.InjectionTarget<T> createInjectionTarget(EjbDescriptor<T> descriptor)
The injection target for the given EJB, or null if Weld was not given this descriptor in the deployment. This should only be used to create an inject contextual EJBs by the EJB container. #fireProcessInjectionTarget() must be used to obtain an InjectionTarget for non-contextual EJB injection.

Type Parameters:
T -
Parameters:
descriptor -
Returns:

getBean

<T> javax.enterprise.inject.spi.Bean<T> getBean(EjbDescriptor<T> descriptor)
Get the Bean object for the given EJB, or null if Weld was not given this descriptor in the deployment.

Type Parameters:
T -
Parameters:
descriptor -
Returns:

getEjbDescriptor

<T> EjbDescriptor<T> getEjbDescriptor(String ejbName)
Get the EjbDescriptor for the given ejb name

Type Parameters:
T -
Parameters:
ejbName -
Returns:

getServices

ServiceRegistry getServices()
Get the services registered for this manager

Returns:

getCurrent

WeldManager getCurrent()
Returns:
the WeldManager that corresponds to the current activity

fireProcessInjectionTarget

<X> javax.enterprise.inject.spi.InjectionTarget<X> fireProcessInjectionTarget(javax.enterprise.inject.spi.AnnotatedType<X> type)
Fire a ProcessInjectionTarget event for the given type. A helper method to allow integration code to easily fire the ProcessInjectionTarget for Java EE component classes supporting injection The container must use the returned InjectionTarget to inject the Java EE component.

Type Parameters:
X -
Parameters:
type -
Returns:

getId

String getId()
The ID of the manager, identical to the ID provided by the BDA

Returns:

instance

javax.enterprise.inject.Instance<Object> instance()


Copyright © 2013 Seam Framework. All Rights Reserved.