T
- type of the event the configured ObserverMethod will observepublic 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.
ProcessObserverMethod.configureObserverMethod()
,
AfterBeanDiscovery.addObserverMethod()
Modifier and Type | Interface and Description |
---|---|
static interface |
ObserverMethodConfigurator.EventConsumer<T>
Represents an operation that accepts a context of a fired event.
|
Modifier and Type | Method and Description |
---|---|
ObserverMethodConfigurator<T> |
addQualifier(java.lang.annotation.Annotation qualifier)
Add the qualifier to the observed event
|
ObserverMethodConfigurator<T> |
addQualifiers(java.lang.annotation.Annotation... qualifiers)
Add all the qualifiers to the Observed event
|
ObserverMethodConfigurator<T> |
addQualifiers(java.util.Set<java.lang.annotation.Annotation> qualifiers)
Add all the qualifiers to the Observed event
|
ObserverMethodConfigurator<T> |
async(boolean async)
Allows modification of the asynchronous status of the observer to build.
|
ObserverMethodConfigurator<T> |
beanClass(java.lang.Class<?> type)
Set the class of the Bean containing this observer.
|
ObserverMethodConfigurator<T> |
notifyWith(ObserverMethodConfigurator.EventConsumer<T> callback)
Define an operation that accepts a context of a fired event.
|
ObserverMethodConfigurator<T> |
observedType(java.lang.reflect.Type type)
Set the type of the observed event
|
ObserverMethodConfigurator<T> |
priority(int priority)
Set the priority for the observer to build
|
ObserverMethodConfigurator<T> |
qualifiers(java.lang.annotation.Annotation... qualifiers)
Replace all qualifiers on the Observed event.
|
ObserverMethodConfigurator<T> |
qualifiers(java.util.Set<java.lang.annotation.Annotation> qualifiers)
Replace all qualifiers on the Observed event.
|
ObserverMethodConfigurator<T> |
read(AnnotatedMethod<?> method)
Read observer meta data from a existing
AnnotatedMethod |
ObserverMethodConfigurator<T> |
read(java.lang.reflect.Method method)
Read observer meta data from a existing
Method |
ObserverMethodConfigurator<T> |
read(ObserverMethod<T> method)
Read observer meta data from a existing ObserverMethod
|
ObserverMethodConfigurator<T> |
reception(Reception reception)
Set the
Reception mode for the observer to build |
ObserverMethodConfigurator<T> |
transactionPhase(TransactionPhase transactionPhase)
Set the
TransactionPhase for the observer to build |
ObserverMethodConfigurator<T> read(java.lang.reflect.Method method)
Method
method
- to read meta data fromObserverMethodConfigurator<T> read(AnnotatedMethod<?> method)
AnnotatedMethod
method
- to read meta data fromObserverMethodConfigurator<T> read(ObserverMethod<T> method)
method
- to read meta data fromObserverMethodConfigurator<T> beanClass(java.lang.Class<?> type)
type
- the bean class containing this configurator.ObserverMethodConfigurator<T> observedType(java.lang.reflect.Type type)
type
- of the observed eventObserverMethodConfigurator<T> addQualifier(java.lang.annotation.Annotation qualifier)
qualifier
- to add to eventObserverMethodConfigurator<T> addQualifiers(java.lang.annotation.Annotation... qualifiers)
qualifiers
- to add to eventObserverMethodConfigurator<T> addQualifiers(java.util.Set<java.lang.annotation.Annotation> qualifiers)
qualifiers
- to add to eventObserverMethodConfigurator<T> qualifiers(java.lang.annotation.Annotation... qualifiers)
qualifiers
- to put on eventObserverMethodConfigurator<T> qualifiers(java.util.Set<java.lang.annotation.Annotation> qualifiers)
qualifiers
- to put on eventObserverMethodConfigurator<T> reception(Reception reception)
Reception
mode for the observer to buildreception
- reception typeObserverMethodConfigurator<T> transactionPhase(TransactionPhase transactionPhase)
TransactionPhase
for the observer to buildtransactionPhase
- phase for the observerObserverMethodConfigurator<T> priority(int priority)
priority
- priority of the observerObserverMethodConfigurator<T> notifyWith(ObserverMethodConfigurator.EventConsumer<T> callback)
callback
- to call for the event notificationObserverMethodConfigurator<T> async(boolean async)
async
- async status