com.caucho.config.event
Class ObserverMethodImpl<X,T>

java.lang.Object
  extended by com.caucho.config.event.AbstractObserverMethod<T>
      extended by com.caucho.config.event.ObserverMethodImpl<X,T>
All Implemented Interfaces:
ObserverMethod<T>
Direct Known Subclasses:
ObserverMethodAfterCompletionImpl, ObserverMethodAfterFailureImpl, ObserverMethodAfterSuccessImpl, ObserverMethodBeforeCompletionImpl

public class ObserverMethodImpl<X,T>
extends AbstractObserverMethod<T>

Internal implementation for a producer Bean


Constructor Summary
ObserverMethodImpl(InjectManager beanManager, Bean<X> bean, AnnotatedMethod<X> method, java.lang.reflect.Type type, java.util.Set<java.lang.annotation.Annotation> qualifiers)
           
 
Method Summary
 AnnotatedMethod<X> getAnnotatedMethod()
          Returns the annotated method
 java.lang.Class<X> getBeanClass()
           
protected  java.lang.Object[] getEventArguments(java.lang.Object event, CreationalContextImpl<?> parentEnv)
           
protected  X getExistsInstance()
           
 java.util.Set<java.lang.annotation.Annotation> getObservedQualifiers()
          Returns the observed event bindings
 java.lang.reflect.Type getObservedType()
          Returns the observed event type
 Bean<X> getParentBean()
          Returns the declaring bean
 Reception getReception()
           
 TransactionPhase getTransactionPhase()
           
 void notify(T event)
          Send the event notification.
protected  void notifyImpl(T event)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObserverMethodImpl

public ObserverMethodImpl(InjectManager beanManager,
                          Bean<X> bean,
                          AnnotatedMethod<X> method,
                          java.lang.reflect.Type type,
                          java.util.Set<java.lang.annotation.Annotation> qualifiers)
Method Detail

getAnnotatedMethod

public AnnotatedMethod<X> getAnnotatedMethod()
Returns the annotated method


getParentBean

public Bean<X> getParentBean()
Returns the declaring bean


getBeanClass

public java.lang.Class<X> getBeanClass()
Specified by:
getBeanClass in interface ObserverMethod<T>
Overrides:
getBeanClass in class AbstractObserverMethod<T>

getObservedType

public java.lang.reflect.Type getObservedType()
Returns the observed event type

Specified by:
getObservedType in interface ObserverMethod<T>
Overrides:
getObservedType in class AbstractObserverMethod<T>

getObservedQualifiers

public java.util.Set<java.lang.annotation.Annotation> getObservedQualifiers()
Returns the observed event bindings

Specified by:
getObservedQualifiers in interface ObserverMethod<T>
Overrides:
getObservedQualifiers in class AbstractObserverMethod<T>

notify

public void notify(T event)
Send the event notification.

Specified by:
notify in interface ObserverMethod<T>
Specified by:
notify in class AbstractObserverMethod<T>

notifyImpl

protected void notifyImpl(T event)

getExistsInstance

protected X getExistsInstance()

getEventArguments

protected java.lang.Object[] getEventArguments(java.lang.Object event,
                                               CreationalContextImpl<?> parentEnv)

getReception

public Reception getReception()
Specified by:
getReception in interface ObserverMethod<T>
Overrides:
getReception in class AbstractObserverMethod<T>

getTransactionPhase

public TransactionPhase getTransactionPhase()
Specified by:
getTransactionPhase in interface ObserverMethod<T>
Overrides:
getTransactionPhase in class AbstractObserverMethod<T>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object