Class ObserverMethodConfiguratorImpl<T>
- java.lang.Object
-
- org.jboss.weld.bootstrap.events.configurator.ObserverMethodConfiguratorImpl<T>
-
- All Implemented Interfaces:
ObserverMethodConfigurator<T>,Configurator<ObserverMethod<T>>
public class ObserverMethodConfiguratorImpl<T> extends Object implements ObserverMethodConfigurator<T>, Configurator<ObserverMethod<T>>
- Author:
- Martin Kouba
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.enterprise.inject.spi.configurator.ObserverMethodConfigurator
ObserverMethodConfigurator.EventConsumer<T>
-
-
Constructor Summary
Constructors Constructor Description ObserverMethodConfiguratorImpl(Extension extension)ObserverMethodConfiguratorImpl(ObserverMethod<T> observerMethod, Extension extension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObserverMethodConfigurator<T>addQualifier(Annotation qualifier)Add the qualifier to the observed eventObserverMethodConfigurator<T>addQualifiers(Annotation... qualifiers)Add all the qualifiers to the Observed eventObserverMethodConfigurator<T>addQualifiers(Set<Annotation> qualifiers)Add all the qualifiers to the Observed eventObserverMethodConfigurator<T>async(boolean async)Allows modification of the asynchronous status of the observer to build.ObserverMethodConfigurator<T>beanClass(Class<?> beanClass)Set the class of the Bean containing this observer.ObserverMethod<T>complete()Returns a finished component.ObserverMethodConfigurator<T>notifyWith(ObserverMethodConfigurator.EventConsumer<T> callback)Define an operation that accepts a context of a fired event.ObserverMethodConfigurator<T>observedType(Type type)Set the type of the observed eventObserverMethodConfigurator<T>priority(int priority)Set the priority for the observer to buildObserverMethodConfigurator<T>qualifiers(Annotation... qualifiers)Replace all qualifiers on the Observed event.ObserverMethodConfigurator<T>qualifiers(Set<Annotation> qualifiers)Replace all qualifiers on the Observed event.ObserverMethodConfigurator<T>read(Method method)Read observer meta data from a existingMethodObserverMethodConfigurator<T>read(AnnotatedMethod<?> method)Read observer meta data from a existingAnnotatedMethodObserverMethodConfigurator<T>read(ObserverMethod<T> observerMethod)Read observer meta data from a existing ObserverMethodObserverMethodConfigurator<T>reception(Reception reception)Set theReceptionmode for the observer to buildObserverMethodConfigurator<T>transactionPhase(TransactionPhase transactionPhase)Set theTransactionPhasefor the observer to build
-
-
-
Constructor Detail
-
ObserverMethodConfiguratorImpl
public ObserverMethodConfiguratorImpl(Extension extension)
-
ObserverMethodConfiguratorImpl
public ObserverMethodConfiguratorImpl(ObserverMethod<T> observerMethod, Extension extension)
-
-
Method Detail
-
read
public ObserverMethodConfigurator<T> read(Method method)
Description copied from interface:ObserverMethodConfiguratorRead observer meta data from a existingMethod- Specified by:
readin interfaceObserverMethodConfigurator<T>- Parameters:
method- to read meta data from- Returns:
- self
-
read
public ObserverMethodConfigurator<T> read(AnnotatedMethod<?> method)
Description copied from interface:ObserverMethodConfiguratorRead observer meta data from a existingAnnotatedMethod- Specified by:
readin interfaceObserverMethodConfigurator<T>- Parameters:
method- to read meta data from- Returns:
- self
-
read
public ObserverMethodConfigurator<T> read(ObserverMethod<T> observerMethod)
Description copied from interface:ObserverMethodConfiguratorRead observer meta data from a existing ObserverMethod- Specified by:
readin interfaceObserverMethodConfigurator<T>- Parameters:
observerMethod- to read meta data from- Returns:
- self
-
beanClass
public ObserverMethodConfigurator<T> beanClass(Class<?> beanClass)
Description copied from interface:ObserverMethodConfiguratorSet the class of the Bean containing this observer. If not set, the extension class is used.- Specified by:
beanClassin interfaceObserverMethodConfigurator<T>- Parameters:
beanClass- the bean class containing this configurator.- Returns:
- self
-
observedType
public ObserverMethodConfigurator<T> observedType(Type type)
Description copied from interface:ObserverMethodConfiguratorSet the type of the observed event- Specified by:
observedTypein interfaceObserverMethodConfigurator<T>- Parameters:
type- of the observed event- Returns:
- self
-
addQualifier
public ObserverMethodConfigurator<T> addQualifier(Annotation qualifier)
Description copied from interface:ObserverMethodConfiguratorAdd the qualifier to the observed event- Specified by:
addQualifierin interfaceObserverMethodConfigurator<T>- Parameters:
qualifier- to add to event- Returns:
- self
-
addQualifiers
public ObserverMethodConfigurator<T> addQualifiers(Annotation... qualifiers)
Description copied from interface:ObserverMethodConfiguratorAdd all the qualifiers to the Observed event- Specified by:
addQualifiersin interfaceObserverMethodConfigurator<T>- Parameters:
qualifiers- to add to event- Returns:
- self
-
addQualifiers
public ObserverMethodConfigurator<T> addQualifiers(Set<Annotation> qualifiers)
Description copied from interface:ObserverMethodConfiguratorAdd all the qualifiers to the Observed event- Specified by:
addQualifiersin interfaceObserverMethodConfigurator<T>- Parameters:
qualifiers- to add to event- Returns:
- self
-
qualifiers
public ObserverMethodConfigurator<T> qualifiers(Annotation... qualifiers)
Description copied from interface:ObserverMethodConfiguratorReplace all qualifiers on the Observed event.- Specified by:
qualifiersin interfaceObserverMethodConfigurator<T>- Parameters:
qualifiers- to put on event- Returns:
- self
-
qualifiers
public ObserverMethodConfigurator<T> qualifiers(Set<Annotation> qualifiers)
Description copied from interface:ObserverMethodConfiguratorReplace all qualifiers on the Observed event.- Specified by:
qualifiersin interfaceObserverMethodConfigurator<T>- Parameters:
qualifiers- to put on event- Returns:
- self
-
reception
public ObserverMethodConfigurator<T> reception(Reception reception)
Description copied from interface:ObserverMethodConfiguratorSet theReceptionmode for the observer to build- Specified by:
receptionin interfaceObserverMethodConfigurator<T>- Parameters:
reception- reception type- Returns:
- self
-
transactionPhase
public ObserverMethodConfigurator<T> transactionPhase(TransactionPhase transactionPhase)
Description copied from interface:ObserverMethodConfiguratorSet theTransactionPhasefor the observer to build- Specified by:
transactionPhasein interfaceObserverMethodConfigurator<T>- Parameters:
transactionPhase- phase for the observer- Returns:
- self
-
priority
public ObserverMethodConfigurator<T> priority(int priority)
Description copied from interface:ObserverMethodConfiguratorSet the priority for the observer to build- Specified by:
priorityin interfaceObserverMethodConfigurator<T>- Parameters:
priority- priority of the observer- Returns:
- self
-
notifyWith
public ObserverMethodConfigurator<T> notifyWith(ObserverMethodConfigurator.EventConsumer<T> callback)
Description copied from interface:ObserverMethodConfiguratorDefine an operation that accepts a context of a fired event.- Specified by:
notifyWithin interfaceObserverMethodConfigurator<T>- Parameters:
callback- to call for the event notification- Returns:
- self
-
async
public ObserverMethodConfigurator<T> async(boolean async)
Description copied from interface:ObserverMethodConfiguratorAllows modification of the asynchronous status of the observer to build.- Specified by:
asyncin interfaceObserverMethodConfigurator<T>- Parameters:
async- async status- Returns:
- self
-
complete
public ObserverMethod<T> complete()
Description copied from interface:ConfiguratorReturns a finished component.- Specified by:
completein interfaceConfigurator<T>- Returns:
- a finished component
-
-