Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.client.lifecycle.impl
Class LifecycleEventImpl<T>

java.lang.Object
  extended by org.jboss.errai.ioc.client.lifecycle.impl.LifecycleEventImpl<T>
All Implemented Interfaces:
LifecycleEvent<T>
Direct Known Subclasses:
AccessImpl, CreationImpl, DestructionImpl, StateChangeImpl

public abstract class LifecycleEventImpl<T>
extends Object
implements LifecycleEvent<T>


Constructor Summary
LifecycleEventImpl()
           
 
Method Summary
 void fireAsync(T instance)
          Fire this event, notifying any listeners for this event type by calling the respective LifecycleListener.observeEvent(LifecycleEvent) methods.
 void fireAsync(T instance, LifecycleCallback callback)
          Fire this event, notifying any listeners for this event type by calling the respective LifecycleListener.observeEvent(LifecycleEvent) methods.
abstract  Class<?> getEventType()
          This must return the interface of the event it represents (i.e.
 T getInstance()
          This method should only be called from within LifecycleListener.observeEvent(LifecycleEvent).
 void veto()
          Veto this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifecycleEventImpl

public LifecycleEventImpl()
Method Detail

fireAsync

public void fireAsync(T instance)
Description copied from interface: LifecycleEvent
Fire this event, notifying any listeners for this event type by calling the respective LifecycleListener.observeEvent(LifecycleEvent) methods.

Specified by:
fireAsync in interface LifecycleEvent<T>
Parameters:
instance - The bean instance associated with this event.

fireAsync

public void fireAsync(T instance,
                      LifecycleCallback callback)
Description copied from interface: LifecycleEvent
Fire this event, notifying any listeners for this event type by calling the respective LifecycleListener.observeEvent(LifecycleEvent) methods.

Specified by:
fireAsync in interface LifecycleEvent<T>
Parameters:
instance - The bean instance associated with this event.
callback - A callback for receiving the result of a fired event (whether or not any listeners vetoed.

veto

public void veto()
Description copied from interface: LifecycleEvent
Veto this event. If this method is called by a LifecycleListener during the LifecycleListener.observeEvent(LifecycleEvent) then:

getEventType

public abstract Class<?> getEventType()
This must return the interface of the event it represents (i.e. Access rather than AccessImpl).


getInstance

public T getInstance()
Description copied from interface: LifecycleEvent
This method should only be called from within LifecycleListener.observeEvent(LifecycleEvent). The instance is set immediately before calling listeners and unset immediately after.

Specified by:
getInstance in interface LifecycleEvent<T>
Returns:
The instance for which this event has been fired or null if this event is not actively being fired.

Errai 3.0.1-SNAPSHOT

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