Interface ObserverMethodConfigurator<T>
- Type Parameters:
T- type of the event the configured ObserverMethod will observe
public interface ObserverMethodConfigurator<T>
An ObserverMethodConfigurator can configure an ObserverMethod. The container must provide an implementation
of this interface.
This configurator is not thread safe and shall not be used concurrently.
- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents an operation that accepts a context of a fired event. -
Method Summary
Modifier and TypeMethodDescriptionaddQualifier(Annotation qualifier) Add the qualifier to the observed eventaddQualifiers(Annotation... qualifiers) Add all the qualifiers to the Observed eventaddQualifiers(Set<Annotation> qualifiers) Add all the qualifiers to the Observed eventasync(boolean async) Allows modification of the asynchronous status of the observer to build.Set the class of the Bean containing this observer.notifyWith(ObserverMethodConfigurator.EventConsumer<T> callback) Define an operation that accepts a context of a fired event.observedType(Type type) Set the type of the observed eventpriority(int priority) Set the priority for the observer to buildqualifiers(Annotation... qualifiers) Replace all qualifiers on the Observed event.qualifiers(Set<Annotation> qualifiers) Replace all qualifiers on the Observed event.read(AnnotatedMethod<?> method) Read observer meta data from a existingAnnotatedMethodread(ObserverMethod<T> method) Read observer meta data from a existing ObserverMethodRead observer meta data from a existingMethodSet theReceptionmode for the observer to buildtransactionPhase(TransactionPhase transactionPhase) Set theTransactionPhasefor the observer to build
-
Method Details
-
read
Read observer meta data from a existingMethod- Parameters:
method- to read meta data from- Returns:
- self
-
read
Read observer meta data from a existingAnnotatedMethod- Parameters:
method- to read meta data from- Returns:
- self
-
read
Read observer meta data from a existing ObserverMethod- Parameters:
method- to read meta data from- Returns:
- self
-
beanClass
Set the class of the Bean containing this observer. If not set, the extension class is used.- Parameters:
type- the bean class containing this configurator.- Returns:
- self
-
observedType
Set the type of the observed event- Parameters:
type- of the observed event- Returns:
- self
-
addQualifier
Add the qualifier to the observed event- Parameters:
qualifier- to add to event- Returns:
- self
-
addQualifiers
Add all the qualifiers to the Observed event- Parameters:
qualifiers- to add to event- Returns:
- self
-
addQualifiers
Add all the qualifiers to the Observed event- Parameters:
qualifiers- to add to event- Returns:
- self
-
qualifiers
Replace all qualifiers on the Observed event.- Parameters:
qualifiers- to put on event- Returns:
- self
-
qualifiers
Replace all qualifiers on the Observed event.- Parameters:
qualifiers- to put on event- Returns:
- self
-
reception
Set theReceptionmode for the observer to build- Parameters:
reception- reception type- Returns:
- self
-
transactionPhase
Set theTransactionPhasefor the observer to build- Parameters:
transactionPhase- phase for the observer- Returns:
- self
-
priority
Set the priority for the observer to build- Parameters:
priority- priority of the observer- Returns:
- self
-
notifyWith
Define an operation that accepts a context of a fired event.- Parameters:
callback- to call for the event notification- Returns:
- self
-
async
Allows modification of the asynchronous status of the observer to build.- Parameters:
async- async status- Returns:
- self
-