public final class LifecycleSupport extends Object
Constructor and Description |
---|
LifecycleSupport(Lifecycle lifecycle)
Construct a new LifecycleSupport object associated with the specified
Lifecycle component.
|
Modifier and Type | Method and Description |
---|---|
void |
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.
|
List<LifecycleListener> |
findLifecycleListeners()
Gets the (possibly empty) list of lifecycle listeners associated
with this LifecycleSupport instance.
|
void |
fireLifecycleEvent(String type,
Object data)
Notify all lifecycle event listeners that a particular event has
occurred for this Container.
|
void |
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.
|
void |
removeLifecycleListeners()
Removes any lifecycle event listeners from this LifecycleSupport
instance.
|
public LifecycleSupport(Lifecycle lifecycle)
lifecycle
- The Lifecycle component that will be the source
of events that we firepublic void addLifecycleListener(LifecycleListener listener)
listener
- The listener to addpublic List<LifecycleListener> findLifecycleListeners()
public void fireLifecycleEvent(String type, Object data) throws LifecycleException
type
- Event typedata
- Event dataLifecycleException
public void removeLifecycleListener(LifecycleListener listener)
listener
- The listener to removepublic void removeLifecycleListeners()
Copyright © 2019. All rights reserved.