Errai 3.0.1-SNAPSHOT

org.jboss.errai.cdi.server.events
Class DynamicEventObserverMethod

java.lang.Object
  extended by org.jboss.errai.cdi.server.events.DynamicEventObserverMethod
All Implemented Interfaces:
javax.enterprise.inject.spi.ObserverMethod

public class DynamicEventObserverMethod
extends Object
implements javax.enterprise.inject.spi.ObserverMethod

An implementation of the CDI SPI ObserverMethod interface to observe events within the CDI container with the purpose of propagating these events to all connected clients using Errai's message bus.

Author:
Mike Brock, Christian Sadilek

Field Summary
protected  Set<Annotation> annotations
           
protected  Set<String> annotationTypes
           
protected  MessageBus bus
           
protected  EventRoutingTable eventRoutingTable
          An instance of the MessageBus.
protected  Class<?> eventType
           
 
Constructor Summary
DynamicEventObserverMethod(EventRoutingTable eventRoutingTable, MessageBus bus, Class<?> eventType, Set<String> annotations)
           
 
Method Summary
 boolean equals(Object o)
           
 Class<?> getBeanClass()
           
 Set<Annotation> getObservedQualifiers()
           
 Class<?> getObservedType()
           
 javax.enterprise.event.Reception getReception()
           
 javax.enterprise.event.TransactionPhase getTransactionPhase()
           
 int hashCode()
           
 void notify(Object event)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventRoutingTable

protected final EventRoutingTable eventRoutingTable
An instance of the MessageBus.


bus

protected final MessageBus bus

eventType

protected final Class<?> eventType

annotationTypes

protected final Set<String> annotationTypes

annotations

protected final Set<Annotation> annotations
Constructor Detail

DynamicEventObserverMethod

public DynamicEventObserverMethod(EventRoutingTable eventRoutingTable,
                                  MessageBus bus,
                                  Class<?> eventType,
                                  Set<String> annotations)
                           throws ClassNotFoundException
Throws:
ClassNotFoundException
Method Detail

getBeanClass

public Class<?> getBeanClass()
Specified by:
getBeanClass in interface javax.enterprise.inject.spi.ObserverMethod

getObservedType

public Class<?> getObservedType()
Specified by:
getObservedType in interface javax.enterprise.inject.spi.ObserverMethod

getObservedQualifiers

public Set<Annotation> getObservedQualifiers()
Specified by:
getObservedQualifiers in interface javax.enterprise.inject.spi.ObserverMethod

getReception

public javax.enterprise.event.Reception getReception()
Specified by:
getReception in interface javax.enterprise.inject.spi.ObserverMethod

getTransactionPhase

public javax.enterprise.event.TransactionPhase getTransactionPhase()
Specified by:
getTransactionPhase in interface javax.enterprise.inject.spi.ObserverMethod

notify

public void notify(Object event)
Specified by:
notify in interface javax.enterprise.inject.spi.ObserverMethod

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.