org.jboss.webbeans.event
Class EventImpl<T>

java.lang.Object
  extended by org.jboss.webbeans.FacadeImpl<T>
      extended by 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

Field Summary
 
Fields inherited from class org.jboss.webbeans.FacadeImpl
bindings, type
 
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
<E> Event<E>
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 org.jboss.webbeans.FacadeImpl
getManager, mergeInBindings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventImpl

public EventImpl(java.lang.reflect.Type eventType,
                 ManagerImpl manager,
                 java.util.Set<java.lang.annotation.Annotation> bindings)
Constructor

Parameters:
eventType - The event type
manager - The Web Beans manager
bindings - The binding types
Method Detail

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 object
bindings - 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.