|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.weld.event.ObserverMethodImpl<X,T>
public class ObserverMethodImpl<X,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.
| Field Summary | |
|---|---|
protected RIBean<X> |
declaringBean
|
protected BeanManagerImpl |
manager
|
protected MethodInjectionPoint<T,X> |
observerMethod
|
protected javax.enterprise.event.TransactionPhase |
transactionPhase
|
| Constructor Summary | |
|---|---|
protected |
ObserverMethodImpl(WeldMethod<T,X> observer,
RIBean<X> declaringBean,
BeanManagerImpl manager)
Creates an Observer which describes and encapsulates an observer method (8.5). |
| Method Summary | |
|---|---|
javax.enterprise.inject.spi.Bean<X> |
getBean()
|
java.lang.annotation.Annotation[] |
getBindingsAsArray()
|
MethodInjectionPoint<T,X> |
getMethod()
|
javax.enterprise.event.Notify |
getNotify()
|
java.util.Set<java.lang.annotation.Annotation> |
getObservedQualifiers()
|
java.lang.reflect.Type |
getObservedType()
|
javax.enterprise.event.TransactionPhase |
getTransactionPhase()
|
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. |
protected void |
sendEventAsynchronously(T event)
Queues the event for later execution |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected BeanManagerImpl manager
protected final RIBean<X> declaringBean
protected final MethodInjectionPoint<T,X> observerMethod
protected javax.enterprise.event.TransactionPhase transactionPhase
| Constructor Detail |
|---|
protected ObserverMethodImpl(WeldMethod<T,X> observer,
RIBean<X> declaringBean,
BeanManagerImpl manager)
observer - The observerdeclaringBean - The observer beanmanager - The Bean manager| Method Detail |
|---|
public javax.enterprise.inject.spi.Bean<X> getBean()
getBean in interface javax.enterprise.inject.spi.ObserverMethod<X,T>public java.lang.annotation.Annotation[] getBindingsAsArray()
public javax.enterprise.event.Notify getNotify()
getNotify in interface javax.enterprise.inject.spi.ObserverMethod<X,T>public java.util.Set<java.lang.annotation.Annotation> getObservedQualifiers()
getObservedQualifiers in interface javax.enterprise.inject.spi.ObserverMethod<X,T>public java.lang.reflect.Type getObservedType()
getObservedType in interface javax.enterprise.inject.spi.ObserverMethod<X,T>public javax.enterprise.event.TransactionPhase getTransactionPhase()
getTransactionPhase in interface javax.enterprise.inject.spi.ObserverMethod<X,T>public MethodInjectionPoint<T,X> getMethod()
public void initialize()
public void notify(T event)
notify in interface javax.enterprise.inject.spi.ObserverMethod<X,T>protected void sendEvent(T event)
event - The event to notify observer withprotected void sendEventAsynchronously(T event)
event - public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||