public interface LifecycleListener<T>
LifecycleEvents
on IOC beans.Modifier and Type | Method and Description |
---|---|
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. |
void observeEvent(LifecycleEvent<T> event)
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.event
- The event being observed.boolean isObserveableEventType(Class<? extends LifecycleEvent<T>> eventType)
eventType
- A type of subclass of LifecycleEvent
.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.