Package org.jboss.weld.event
Class ExtensionObserverMethodImpl<T,X>
java.lang.Object
org.jboss.weld.event.ObserverMethodImpl<T,X>
org.jboss.weld.event.ExtensionObserverMethodImpl<T,X>
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.ObserverMethod<T>,jakarta.enterprise.inject.spi.Prioritized,ContainerLifecycleEventObserverMethod<T>,EventMetadataAwareObserverMethod<T>
public class ExtensionObserverMethodImpl<T,X>
extends ObserverMethodImpl<T,X>
implements ContainerLifecycleEventObserverMethod<T>
An implementation of
ObserverMethod used for events delivered to extensions.
The observer method does not require contexts to be active.- Author:
- Jozef Hartinger
-
Field Summary
Fields inherited from class org.jboss.weld.event.ObserverMethodImpl
beanManager, declaringBean, ID_PREFIX, ID_SEPARATOR, observerMethod, SPECIAL_PARAM_MARKERS, transactionPhaseFields inherited from interface jakarta.enterprise.inject.spi.ObserverMethod
DEFAULT_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExtensionObserverMethodImpl(EnhancedAnnotatedMethod<T, ? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager, boolean isAsync) -
Method Summary
Modifier and TypeMethodDescriptionprotected <Y> voidcheckRequiredTypeAnnotations(EnhancedAnnotatedParameter<?, ?> eventParameter, EnhancedAnnotatedMethod<T, Y> annotated) protected StringcreateTypeId(RIBean<?> declaringBean) booleanprotected ObjectgetReceiver(jakarta.enterprise.context.spi.CreationalContext<X> ctx) Collection<Class<? extends Annotation>>Collection<Class<? extends Annotation>>inthashCode()protected MethodInjectionPoint<T,? super X> initMethodInjectionPoint(EnhancedAnnotatedMethod<T, ? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager) protected Set<Class<? extends Annotation>>initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) protected voidpostNotify(T event, Object receiver) protected voidHooks allowing subclasses to perform additional logic just before and just after an event is delivered to an observer method.protected voidsendEvent(T event, Object receiver, jakarta.enterprise.context.spi.CreationalContext<?> creationalContext) Note thatCreationalContext.release()is not invoked within this method.Methods inherited from class org.jboss.weld.event.ObserverMethodImpl
createId, getBeanClass, getDeclaringBean, getEventParameter, getId, getInjectionPoints, getMethod, getObservedQualifiers, getObservedType, getPriority, getReception, getTransactionPhase, initialize, isAsync, isEventMetadataRequired, notify, notify, sendEvent, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.enterprise.inject.spi.ObserverMethod
getBeanClass, getDeclaringBean, getObservedQualifiers, getObservedType, getPriority, getReception, getTransactionPhase, isAsync, notify, notify
-
Constructor Details
-
ExtensionObserverMethodImpl
protected ExtensionObserverMethodImpl(EnhancedAnnotatedMethod<T, ? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager, boolean isAsync)
-
-
Method Details
-
initRequiredTypeAnnotations
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) -
checkRequiredTypeAnnotations
protected <Y> void checkRequiredTypeAnnotations(EnhancedAnnotatedParameter<?, ?> eventParameter, EnhancedAnnotatedMethod<T, Y> annotated) - Overrides:
checkRequiredTypeAnnotationsin classObserverMethodImpl<T,X>
-
initMethodInjectionPoint
protected MethodInjectionPoint<T,? super X> initMethodInjectionPoint(EnhancedAnnotatedMethod<T, ? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager) - Overrides:
initMethodInjectionPointin classObserverMethodImpl<T,X>
-
preNotify
Description copied from class:ObserverMethodImplHooks allowing subclasses to perform additional logic just before and just after an event is delivered to an observer method.- Overrides:
preNotifyin classObserverMethodImpl<T,X>
-
postNotify
- Overrides:
postNotifyin classObserverMethodImpl<T,X>
-
getReceiver
- Overrides:
getReceiverin classObserverMethodImpl<T,X>
-
sendEvent
protected void sendEvent(T event, Object receiver, jakarta.enterprise.context.spi.CreationalContext<?> creationalContext) Description copied from class:ObserverMethodImplNote thatCreationalContext.release()is not invoked within this method.- Overrides:
sendEventin classObserverMethodImpl<T,X>
-
createTypeId
- Overrides:
createTypeIdin classObserverMethodImpl<T,X>
-
getRequiredAnnotations
- Specified by:
getRequiredAnnotationsin interfaceContainerLifecycleEventObserverMethod<T>- Returns:
- a collection of required annotations used to filter ProcessAnnotatedType events
- See Also:
-
WithAnnotations
-
getRequiredScopeAnnotations
-
equals
- Overrides:
equalsin classObserverMethodImpl<T,X>
-
hashCode
public int hashCode()- Overrides:
hashCodein classObserverMethodImpl<T,X>
-