|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.webbeans.event.ObserverImpl<T>
public class ObserverImpl<T>
Reference implementation for the Observer 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 ManagerImpl |
manager
|
protected Bean<?> |
observerBean
|
protected MethodInjectionPoint<?> |
observerMethod
|
Constructor Summary | |
---|---|
protected |
ObserverImpl(AnnotatedMethod<?> observer,
Bean<?> observerBean,
ManagerImpl manager)
Creates an Observer which describes and encapsulates an observer method (8.5). |
Method Summary | |
---|---|
java.lang.annotation.Annotation[] |
getBindingsAsArray()
|
java.lang.reflect.Type |
getEventType()
|
void |
initialize()
Completes initialization of the observer and allows derived types to override behavior. |
boolean |
isConditional()
Indicates if the observer is conditional |
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 final Bean<?> observerBean
protected final MethodInjectionPoint<?> observerMethod
protected ManagerImpl manager
Constructor Detail |
---|
protected ObserverImpl(AnnotatedMethod<?> observer, Bean<?> observerBean, ManagerImpl manager)
observer
- The observerobserverBean
- The observer beanmanager
- The Web Beans managerMethod Detail |
---|
public void initialize()
public void notify(T event)
notify
in interface Observer<T>
protected void sendEvent(T event)
event
- The event to notify observer withprotected void sendEventAsynchronously(T event)
event
- public boolean isConditional()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.reflect.Type getEventType()
public java.lang.annotation.Annotation[] getBindingsAsArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |