org.exoplatform.social.common.lifecycle
Class AbstractLifeCycle<T extends LifeCycleListener<E>,E extends LifeCycleEvent<?,?>>
java.lang.Object
org.exoplatform.social.common.lifecycle.AbstractLifeCycle<T,E>
public abstract class AbstractLifeCycle<T extends LifeCycleListener<E>,E extends LifeCycleEvent<?,?>>
- extends Object
Generic implementation a Lifecycle
Events are dispatched asynchronously but sequentially to their listeners
according to their type.
Listeners may fail, this is safe for the lifecycle, subsequent listeners will
still be called.
- Version:
- $Revision$
- Author:
- Patrice
Lamarque
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
protected Set<T extends LifeCycleListener<E>> listeners
container
protected final org.exoplatform.container.PortalContainer container
completionService
protected LifeCycleCompletionService completionService
manager
protected org.exoplatform.commons.chromattic.ChromatticManager manager
lifeCycle
protected org.exoplatform.commons.chromattic.ChromatticLifeCycle lifeCycle
AbstractLifeCycle
protected AbstractLifeCycle()
addListener
public void addListener(T listener)
-
removeListener
public void removeListener(T listener)
-
broadcast
protected void broadcast(E event)
- Broadcasts an event to the registered listeners. The event is broadcasted
asynchronously but sequentially.
- Parameters:
event - - See Also:
dispatchEvent(LifeCycleListener, LifeCycleEvent)
addTasks
protected void addTasks(E event)
begin
protected void begin()
end
protected void end()
dispatchEvent
protected abstract void dispatchEvent(T listener,
E event)
Copyright © 2013 eXo Platform SAS. All Rights Reserved.