|
||||||||||
| 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.
| Nested Class Summary | |
|---|---|
protected static class |
ObserverImpl.TransactionObservationPhase
The known transactional phases a transactional event observer can be interested in |
| 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.Class<T> |
getEventType()
|
|
boolean |
isConditional()
Indicates if the observer is conditional |
|
boolean |
isInterestedInTransactionPhase(ObserverImpl.TransactionObservationPhase currentPhase)
Checks if the observer is interested in a particular transactional phase |
|
boolean |
isTransactional()
Indicates if the observer is transactional |
|
void |
notify(T event)
|
|
static
|
of(AnnotatedMethod<?> method,
AbstractClassBean<?> declaringBean,
ManagerImpl manager)
Creates an observer |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ObserverImpl(AnnotatedMethod<?> observer,
Bean<?> observerBean,
ManagerImpl manager)
observer - The observerobserverBean - The observer beanmanager - The Web Beans manager| Method Detail |
|---|
public static <T> ObserverImpl<T> of(AnnotatedMethod<?> method,
AbstractClassBean<?> declaringBean,
ManagerImpl manager)
method - The observer method abstractiondeclaringBean - The declaring beanmanager - The Web Beans manager
public void notify(T event)
notify in interface Observer<T>public boolean isTransactional()
public boolean isConditional()
public boolean isInterestedInTransactionPhase(ObserverImpl.TransactionObservationPhase currentPhase)
currentPhase - The phase to check
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Class<T> getEventType()
public java.lang.annotation.Annotation[] getBindingsAsArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||