public class LifecycleEventManager extends Object implements CallbackModes, Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
LifecycleEventManager.ListenerAdapter
Interface that facades to other lifecycle listener interfaces can
implement to choose which events to respond to based on their delegate.
|
static class |
LifecycleEventManager.ListenerList
Extended list that tracks what event types its elements care about.
|
CALLBACK_FAIL_FAST, CALLBACK_IGNORE, CALLBACK_LOG, CALLBACK_RETHROW, CALLBACK_ROLLBACK
Constructor and Description |
---|
LifecycleEventManager() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Object listener,
Class<?>[] classes)
Register a lifecycle listener for the given classes.
|
Exception[] |
fireEvent(Object source,
ClassMetaData meta,
int type)
Fire lifecycle event to all registered listeners without an argument.
|
Exception[] |
fireEvent(Object source,
Object related,
ClassMetaData meta,
int type)
Fire lifecycle event to all registered listeners.
|
boolean |
hasAttachListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasClearListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasDeleteListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasDetachListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasDirtyListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasLoadListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasPersistListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasStoreListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
hasUpdateListeners(Object source,
ClassMetaData meta)
Return whether there are listeners or callbacks for the given source.
|
boolean |
isActive(ClassMetaData meta)
Whether this LifeCycleEventManager has had at least one listener or callback
registered.
|
boolean |
isFailFast()
Whether to fail after first exception when firing events to listeners.
|
void |
removeListener(Object listener)
Remove the given listener.
|
void |
setFailFast(boolean failFast)
Whether to fail after first exception when firing events to listeners.
|
public boolean isActive(ClassMetaData meta)
public boolean isFailFast()
public void setFailFast(boolean failFast)
public void addListener(Object listener, Class<?>[] classes)
public void removeListener(Object listener)
public boolean hasPersistListeners(Object source, ClassMetaData meta)
public boolean hasDeleteListeners(Object source, ClassMetaData meta)
public boolean hasClearListeners(Object source, ClassMetaData meta)
public boolean hasLoadListeners(Object source, ClassMetaData meta)
public boolean hasStoreListeners(Object source, ClassMetaData meta)
public boolean hasUpdateListeners(Object source, ClassMetaData meta)
public boolean hasDirtyListeners(Object source, ClassMetaData meta)
public boolean hasDetachListeners(Object source, ClassMetaData meta)
public boolean hasAttachListeners(Object source, ClassMetaData meta)
public Exception[] fireEvent(Object source, ClassMetaData meta, int type)
public Exception[] fireEvent(Object source, Object related, ClassMetaData meta, int type)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.