Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.event » [javadoc | source]
org.apache.webbeans.event
public class: BeanObserverImpl [javadoc | source]
java.lang.Object
   org.apache.webbeans.event.BeanObserverImpl

All Implemented Interfaces:
    javax.enterprise.event.Observer

Direct Known Subclasses:
    BeanObserverXMLImpl

Defines observers that are declared in observer methods.

Example:

 public class X {
     
     public void afterLoggedIn(@Observes @Current LoggedInEvent event)
     {
         .....
     }
 }
Above class X instance observes for the event with type LoggedInEvent and event qualifier is Current. Whenever event is fired, its Observer#notify() method is called.

Constructor:
 public BeanObserverImpl(InjectionTargetBean<?> bean,
    Method observerMethod,
    boolean ifExist,
    TransactionalObserverType type) 
    Creates a new bean observer instance.
    Parameters:
    bean - owner
    observerMethod - method
    ifExist - if exist parameter
    type - transaction type
Method from org.apache.webbeans.event.BeanObserverImpl Summary:
getBean,   getMethodArguments,   getType,   notify
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.webbeans.event.BeanObserverImpl Detail:
 public InjectionTargetBean<?> getBean() 
    Returrns observer owner bean.
 protected List<Object> getMethodArguments(Object event) 
    Returns list of observer method parameters.
 public TransactionalObserverType getType() 
    Returns observer's transactional type.
 public  void notify(T event) 
    {@inheritDoc}