org.jboss.webbeans.event
Class EventImpl<T>
java.lang.Object
org.jboss.webbeans.FacadeImpl<T>
org.jboss.webbeans.event.EventImpl<T>
- Type Parameters:
T
- The type of event being wrapped
- All Implemented Interfaces:
- java.io.Serializable, Event<T>
public class EventImpl<T>
- extends FacadeImpl<T>
- implements Event<T>, java.io.Serializable
Implementation of the Event interface
- Author:
- David Allen
- See Also:
Event
,
Serialized Form
Constructor Summary |
EventImpl(java.lang.reflect.Type eventType,
ManagerImpl manager,
java.util.Set<java.lang.annotation.Annotation> bindings)
Constructor |
Method Summary |
void |
fire(T event,
java.lang.annotation.Annotation... bindings)
Fires an event |
void |
observe(Observer<T> observer,
java.lang.annotation.Annotation... bindings)
Registers an observer |
static
|
of(java.lang.reflect.Type eventType,
ManagerImpl manager,
java.util.Set<java.lang.annotation.Annotation> bindings)
|
java.lang.String |
toString()
Gets a string representation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EventImpl
public EventImpl(java.lang.reflect.Type eventType,
ManagerImpl manager,
java.util.Set<java.lang.annotation.Annotation> bindings)
- Constructor
- Parameters:
eventType
- The event typemanager
- The Web Beans managerbindings
- The binding types
of
public static <E> Event<E> of(java.lang.reflect.Type eventType,
ManagerImpl manager,
java.util.Set<java.lang.annotation.Annotation> bindings)
fire
public void fire(T event,
java.lang.annotation.Annotation... bindings)
- Fires an event
- Specified by:
fire
in interface Event<T>
- Parameters:
event
- The event objectbindings
- Additional binding types
observe
public void observe(Observer<T> observer,
java.lang.annotation.Annotation... bindings)
- Registers an observer
- Specified by:
observe
in interface Event<T>
- Parameters:
observer
- bindings
- Additional binding types
toString
public java.lang.String toString()
- Description copied from class:
FacadeImpl
- Gets a string representation
- Overrides:
toString
in class FacadeImpl<T>
- Returns:
- A string representation
Copyright © 2011. All Rights Reserved.