Package org.infinispan.cdi.common.util
Class ForwardingObserverMethod<T>
- java.lang.Object
-
- org.infinispan.cdi.common.util.ForwardingObserverMethod<T>
-
- Type Parameters:
T- The event type
- All Implemented Interfaces:
ObserverMethod<T>,Prioritized
public abstract class ForwardingObserverMethod<T> extends Object implements ObserverMethod<T>
An implementation ofObserverMethodthat forwards all calls todelegate().- Author:
- Pete Muir
-
-
Field Summary
-
Fields inherited from interface jakarta.enterprise.inject.spi.ObserverMethod
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ForwardingObserverMethod()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ObserverMethod<T>delegate()All calls to thisObserverMethodinstance are forwarded to the delegate unless overridden.booleanequals(Object obj)Class<?>getBeanClass()Obtains the class of the type that declares the observer method.Set<Annotation>getObservedQualifiers()Obtains the set of observed event qualifiers.TypegetObservedType()Obtains the observed event type.ReceptiongetReception()Obtains the specifiedReceptionfor the observer method.TransactionPhasegetTransactionPhase()Obtains the specifiedTransactionPhasefor the observer method.inthashCode()voidnotify(T event)Calls the observer method, passing the given event object.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.enterprise.inject.spi.ObserverMethod
getDeclaringBean, getPriority, isAsync, notify
-
-
-
-
Method Detail
-
delegate
protected abstract ObserverMethod<T> delegate()
All calls to thisObserverMethodinstance are forwarded to the delegate unless overridden.- Returns:
- the delegate
ObserverMethod
-
getBeanClass
public Class<?> getBeanClass()
Description copied from interface:ObserverMethodObtains the class of the type that declares the observer method.
- Specified by:
getBeanClassin interfaceObserverMethod<T>- Returns:
- the defining class
-
getObservedQualifiers
public Set<Annotation> getObservedQualifiers()
Description copied from interface:ObserverMethodObtains the set of observed event qualifiers.- Specified by:
getObservedQualifiersin interfaceObserverMethod<T>- Returns:
- the observed event qualifiers
-
getObservedType
public Type getObservedType()
Description copied from interface:ObserverMethodObtains the observed event type.- Specified by:
getObservedTypein interfaceObserverMethod<T>- Returns:
- the observed event type
-
getReception
public Reception getReception()
Description copied from interface:ObserverMethodObtains the specifiedReceptionfor the observer method. This indicates if the observer is conditional or not.- Specified by:
getReceptionin interfaceObserverMethod<T>- Returns:
- the
Reception
-
getTransactionPhase
public TransactionPhase getTransactionPhase()
Description copied from interface:ObserverMethodObtains the specifiedTransactionPhasefor the observer method.- Specified by:
getTransactionPhasein interfaceObserverMethod<T>- Returns:
- the
TransactionPhase
-
notify
public void notify(T event)
Description copied from interface:ObserverMethodCalls the observer method, passing the given event object.
The implementation of this method for a custom observer method is responsible for deciding whether to call the method if the
ObserverMethod.getReception()returnsReception.IF_EXISTS.- Specified by:
notifyin interfaceObserverMethod<T>- Parameters:
event- the event object
-
-