public class ObserverMethodImpl<T,X> extends Object implements javax.enterprise.inject.spi.ObserverMethod<T>
Reference implementation for the ObserverMethod interface, which represents an observer method. Each observer method has an event type which is the class of the event object being observed, and event binding types that are annotations applied to the event parameter to narrow the event notifications delivered.
Modifier and Type | Field and Description |
---|---|
protected BeanManagerImpl |
beanManager |
protected RIBean<X> |
declaringBean |
static String |
ID_PREFIX |
static String |
ID_SEPARATOR |
protected MethodInjectionPoint<T,? super X> |
observerMethod |
protected javax.enterprise.event.TransactionPhase |
transactionPhase |
Modifier | Constructor and Description |
---|---|
protected |
ObserverMethodImpl(WeldMethod<T,? super X> observer,
RIBean<X> declaringBean,
BeanManagerImpl manager)
Creates an Observer which describes and encapsulates an observer method
(8.5).
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Class<X> |
getBeanClass() |
Annotation[] |
getBindingsAsArray() |
RIBean<X> |
getDeclaringBean() |
String |
getId() |
Set<WeldInjectionPoint<?,?>> |
getInjectionPoints() |
MethodInjectionPoint<T,? super X> |
getMethod() |
Set<WeldInjectionPoint<?,?>> |
getNewInjectionPoints() |
Set<Annotation> |
getObservedQualifiers() |
Type |
getObservedType() |
javax.enterprise.event.Reception |
getReception() |
javax.enterprise.event.TransactionPhase |
getTransactionPhase() |
int |
hashCode() |
protected boolean |
ignore(T event) |
void |
initialize()
Completes initialization of the observer and allows derived types to
override behavior.
|
void |
notify(T event) |
protected void |
sendEvent(T event)
Invokes the observer method immediately passing the event.
|
String |
toString() |
public static final String ID_PREFIX
public static final String ID_SEPARATOR
protected BeanManagerImpl beanManager
protected final MethodInjectionPoint<T,? super X> observerMethod
protected javax.enterprise.event.TransactionPhase transactionPhase
protected ObserverMethodImpl(WeldMethod<T,? super X> observer, RIBean<X> declaringBean, BeanManagerImpl manager)
observer
- The observerdeclaringBean
- The observer beanmanager
- The Bean managerpublic Set<WeldInjectionPoint<?,?>> getInjectionPoints()
public Set<WeldInjectionPoint<?,?>> getNewInjectionPoints()
public Class<X> getBeanClass()
getBeanClass
in interface javax.enterprise.inject.spi.ObserverMethod<T>
public Annotation[] getBindingsAsArray()
public javax.enterprise.event.Reception getReception()
getReception
in interface javax.enterprise.inject.spi.ObserverMethod<T>
public Set<Annotation> getObservedQualifiers()
getObservedQualifiers
in interface javax.enterprise.inject.spi.ObserverMethod<T>
public Type getObservedType()
getObservedType
in interface javax.enterprise.inject.spi.ObserverMethod<T>
public javax.enterprise.event.TransactionPhase getTransactionPhase()
getTransactionPhase
in interface javax.enterprise.inject.spi.ObserverMethod<T>
public MethodInjectionPoint<T,? super X> getMethod()
public void initialize()
public void notify(T event)
notify
in interface javax.enterprise.inject.spi.ObserverMethod<T>
protected void sendEvent(T event)
event
- The event to notify observer withprotected boolean ignore(T event)
public String getId()
Copyright © 2012 Seam Framework. All Rights Reserved.