Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.client.lifecycle.api
Interface LifecycleListener<T>

All Known Subinterfaces:
AuditableLifecycleListener<T>
All Known Implementing Classes:
PageRoleLifecycleListener

public interface LifecycleListener<T>

A listener for observing LifecycleEvents on IOC beans.

Author:
Max Barkley

Method Summary
 boolean isObserveableEventType(Class<? extends LifecycleEvent<T>> eventType)
          Check if this listener observes this event type.
 void observeEvent(LifecycleEvent<T> event)
          This method is called when a LifecycleEvent is called such that isObserveableEventType(Class) returns true for this listener and event.
 

Method Detail

observeEvent

void observeEvent(LifecycleEvent<T> event)
This method is called when a LifecycleEvent is called such that isObserveableEventType(Class) returns true for this listener and event. If LifecycleEvent.veto() is called in this method, any pending listeners will be cancelled and callback of LifecycleEvent#fireAsync(LifecycleCallback) will be invoked with a failure result.

Parameters:
event - The event being observed.

isObserveableEventType

boolean isObserveableEventType(Class<? extends LifecycleEvent<T>> eventType)
Check if this listener observes this event type.

Parameters:
eventType - A type of subclass of LifecycleEvent.
Returns:
True iff this listener observes this event type.

Errai 3.0.1-SNAPSHOT

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