org.gcube.common.ghn.service.handlers
Class LifecycleHandler

java.lang.Object
  extended by org.gcube.common.ghn.service.handlers.AbstractHandler<LifecycleHandler>
      extended by org.gcube.common.ghn.service.handlers.LifecycleHandler
All Implemented Interfaces:
ApplicationHandler<LifecycleHandler>
Direct Known Subclasses:
Publisher

public abstract class LifecycleHandler
extends AbstractHandler<LifecycleHandler>

A Handler of LifecycleEvents.

The handler participates in a Pipeline of other handlers registered for notification of the same events. After processing the event, it may or may not propagate the event to the handlers further down in the Pipeline Pipeline.forward(ApplicationEvent).

Author:
Fabio Simeoni
See Also:
LifecycleEvent, Pipeline

Constructor Summary
LifecycleHandler()
           
 
Method Summary
 void onEvent(ApplicationEvent<LifecycleHandler> e)
          Processes a given event.
 void onStart(LifecycleEvent.Start e)
          Invoked when the container starts a managed app.
 void onStop(LifecycleEvent.Stop e)
          Invoked when the container stops a managed app.
 
Methods inherited from class org.gcube.common.ghn.service.handlers.AbstractHandler
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LifecycleHandler

public LifecycleHandler()
Method Detail

onStart

public void onStart(LifecycleEvent.Start e)
Invoked when the container starts a managed app.

Parameters:
pipeline - the pipeline in which this handler is registered
e - the event

onStop

public void onStop(LifecycleEvent.Stop e)
Invoked when the container stops a managed app.

Parameters:
pipeline - the pipeline in which this handler is registered
e - the stop event

onEvent

public void onEvent(ApplicationEvent<LifecycleHandler> e)
Description copied from interface: ApplicationHandler
Processes a given event.

Parameters:
e - the event


Copyright © 2013. All Rights Reserved.