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:
ObserverMethod<T>,Prioritized,ContainerLifecycleEventObserverMethod<T>,EventMetadataAwareObserverMethod<T>
public class ExtensionObserverMethodImpl<T,X> extends ObserverMethodImpl<T,X> implements ContainerLifecycleEventObserverMethod<T>
An implementation ofObserverMethodused 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, transactionPhase
-
Fields inherited from interface javax.enterprise.inject.spi.ObserverMethod
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedExtensionObserverMethodImpl(EnhancedAnnotatedMethod<T,? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager, boolean isAsync)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckRequiredTypeAnnotations(EnhancedAnnotatedParameter<?,?> eventParameter)protected StringcreateTypeId(RIBean<?> declaringBean)booleanequals(Object obj)protected ObjectgetReceiver(CreationalContext<X> ctx)Collection<Class<? extends Annotation>>getRequiredAnnotations()Collection<Class<? extends Annotation>>getRequiredScopeAnnotations()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 voidpreNotify(T event, Object receiver)Hooks 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, 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, sendEvent, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.ObserverMethod
getBeanClass, getObservedQualifiers, getObservedType, getPriority, getReception, getTransactionPhase, isAsync, notify, notify
-
-
-
-
Constructor Detail
-
ExtensionObserverMethodImpl
protected ExtensionObserverMethodImpl(EnhancedAnnotatedMethod<T,? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager, boolean isAsync)
-
-
Method Detail
-
initRequiredTypeAnnotations
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T,? super X> observer)
-
checkRequiredTypeAnnotations
protected void checkRequiredTypeAnnotations(EnhancedAnnotatedParameter<?,?> eventParameter)
- 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
protected void preNotify(T event, Object receiver)
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
protected void postNotify(T event, Object receiver)
- Overrides:
postNotifyin classObserverMethodImpl<T,X>
-
getReceiver
protected Object getReceiver(CreationalContext<X> ctx)
- Overrides:
getReceiverin classObserverMethodImpl<T,X>
-
sendEvent
protected void sendEvent(T event, Object receiver, CreationalContext<?> creationalContext)
Description copied from class:ObserverMethodImplNote thatCreationalContext.release()is not invoked within this method.- Overrides:
sendEventin classObserverMethodImpl<T,X>
-
createTypeId
protected String createTypeId(RIBean<?> declaringBean)
- Overrides:
createTypeIdin classObserverMethodImpl<T,X>
-
getRequiredAnnotations
public Collection<Class<? extends Annotation>> getRequiredAnnotations()
- Specified by:
getRequiredAnnotationsin interfaceContainerLifecycleEventObserverMethod<T>- Returns:
- a collection of required annotations used to filter ProcessAnnotatedType events
- See Also:
WithAnnotations
-
getRequiredScopeAnnotations
public Collection<Class<? extends Annotation>> getRequiredScopeAnnotations()
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classObserverMethodImpl<T,X>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObserverMethodImpl<T,X>
-
-