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 jakarta.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(AnnotatedMethod<?> method)
Read observer meta data from a existingAnnotatedMethod
ObserverMethodConfigurator<T>
read(ObserverMethod<T> observerMethod)
Read observer meta data from a existing ObserverMethodObserverMethodConfigurator<T>
read(Method method)
Read observer meta data from a existingMethod
ObserverMethodConfigurator<T>
reception(Reception reception)
Set theReception
mode for the observer to buildObserverMethodConfigurator<T>
transactionPhase(TransactionPhase transactionPhase)
Set theTransactionPhase
for 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:ObserverMethodConfigurator
Read observer meta data from a existingMethod
- Specified by:
read
in interfaceObserverMethodConfigurator<T>
- Parameters:
method
- to read meta data from- Returns:
- self
-
read
public ObserverMethodConfigurator<T> read(AnnotatedMethod<?> method)
Description copied from interface:ObserverMethodConfigurator
Read observer meta data from a existingAnnotatedMethod
- Specified by:
read
in interfaceObserverMethodConfigurator<T>
- Parameters:
method
- to read meta data from- Returns:
- self
-
read
public ObserverMethodConfigurator<T> read(ObserverMethod<T> observerMethod)
Description copied from interface:ObserverMethodConfigurator
Read observer meta data from a existing ObserverMethod- Specified by:
read
in interfaceObserverMethodConfigurator<T>
- Parameters:
observerMethod
- to read meta data from- Returns:
- self
-
beanClass
public ObserverMethodConfigurator<T> beanClass(Class<?> beanClass)
Description copied from interface:ObserverMethodConfigurator
Set the class of the Bean containing this observer. If not set, the extension class is used.- Specified by:
beanClass
in interfaceObserverMethodConfigurator<T>
- Parameters:
beanClass
- the bean class containing this configurator.- Returns:
- self
-
observedType
public ObserverMethodConfigurator<T> observedType(Type type)
Description copied from interface:ObserverMethodConfigurator
Set the type of the observed event- Specified by:
observedType
in interfaceObserverMethodConfigurator<T>
- Parameters:
type
- of the observed event- Returns:
- self
-
addQualifier
public ObserverMethodConfigurator<T> addQualifier(Annotation qualifier)
Description copied from interface:ObserverMethodConfigurator
Add the qualifier to the observed event- Specified by:
addQualifier
in interfaceObserverMethodConfigurator<T>
- Parameters:
qualifier
- to add to event- Returns:
- self
-
addQualifiers
public ObserverMethodConfigurator<T> addQualifiers(Annotation... qualifiers)
Description copied from interface:ObserverMethodConfigurator
Add all the qualifiers to the Observed event- Specified by:
addQualifiers
in interfaceObserverMethodConfigurator<T>
- Parameters:
qualifiers
- to add to event- Returns:
- self
-
addQualifiers
public ObserverMethodConfigurator<T> addQualifiers(Set<Annotation> qualifiers)
Description copied from interface:ObserverMethodConfigurator
Add all the qualifiers to the Observed event- Specified by:
addQualifiers
in interfaceObserverMethodConfigurator<T>
- Parameters:
qualifiers
- to add to event- Returns:
- self
-
qualifiers
public ObserverMethodConfigurator<T> qualifiers(Annotation... qualifiers)
Description copied from interface:ObserverMethodConfigurator
Replace all qualifiers on the Observed event.- Specified by:
qualifiers
in interfaceObserverMethodConfigurator<T>
- Parameters:
qualifiers
- to put on event- Returns:
- self
-
qualifiers
public ObserverMethodConfigurator<T> qualifiers(Set<Annotation> qualifiers)
Description copied from interface:ObserverMethodConfigurator
Replace all qualifiers on the Observed event.- Specified by:
qualifiers
in interfaceObserverMethodConfigurator<T>
- Parameters:
qualifiers
- to put on event- Returns:
- self
-
reception
public ObserverMethodConfigurator<T> reception(Reception reception)
Description copied from interface:ObserverMethodConfigurator
Set theReception
mode for the observer to build- Specified by:
reception
in interfaceObserverMethodConfigurator<T>
- Parameters:
reception
- reception type- Returns:
- self
-
transactionPhase
public ObserverMethodConfigurator<T> transactionPhase(TransactionPhase transactionPhase)
Description copied from interface:ObserverMethodConfigurator
Set theTransactionPhase
for the observer to build- Specified by:
transactionPhase
in interfaceObserverMethodConfigurator<T>
- Parameters:
transactionPhase
- phase for the observer- Returns:
- self
-
priority
public ObserverMethodConfigurator<T> priority(int priority)
Description copied from interface:ObserverMethodConfigurator
Set the priority for the observer to build- Specified by:
priority
in interfaceObserverMethodConfigurator<T>
- Parameters:
priority
- priority of the observer- Returns:
- self
-
notifyWith
public ObserverMethodConfigurator<T> notifyWith(ObserverMethodConfigurator.EventConsumer<T> callback)
Description copied from interface:ObserverMethodConfigurator
Define an operation that accepts a context of a fired event.- Specified by:
notifyWith
in interfaceObserverMethodConfigurator<T>
- Parameters:
callback
- to call for the event notification- Returns:
- self
-
async
public ObserverMethodConfigurator<T> async(boolean async)
Description copied from interface:ObserverMethodConfigurator
Allows modification of the asynchronous status of the observer to build.- Specified by:
async
in interfaceObserverMethodConfigurator<T>
- Parameters:
async
- async status- Returns:
- self
-
complete
public ObserverMethod<T> complete()
Description copied from interface:Configurator
Returns a finished component.- Specified by:
complete
in interfaceConfigurator<T>
- Returns:
- a finished component
-
-