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

java.lang.Object
  extended by org.gcube.common.ghn.service.handlers.AbstractHandler<LifetimeHandler>
      extended by org.gcube.common.ghn.service.handlers.LifetimeHandler
All Implemented Interfaces:
ServiceHandler<LifetimeHandler>
Direct Known Subclasses:
LifetimeHandlerAdapter.UnavailableHandler, PublishingHandler

public abstract class LifetimeHandler
extends AbstractHandler<LifetimeHandler>

A Handler of LifetimeEvents.

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(ServiceEvent).

Author:
Fabio Simeoni
See Also:
LifetimeEvent, Pipeline

Constructor Summary
LifetimeHandler()
           
 
Method Summary
 void onEvent(Pipeline<LifetimeHandler> pipeline, ServiceEvent<LifetimeHandler> e)
          Processes a given event.
 void onStart(Pipeline<LifetimeHandler> pipeline, StartServiceEvent e)
          Invoked when the container starts a managed app.
 void onStop(Pipeline<LifetimeHandler> pipeline, StopServiceEvent 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
 
Methods inherited from interface org.gcube.common.ghn.service.handlers.ServiceHandler
name
 

Constructor Detail

LifetimeHandler

public LifetimeHandler()
Method Detail

onStart

public void onStart(Pipeline<LifetimeHandler> pipeline,
                    StartServiceEvent 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(Pipeline<LifetimeHandler> pipeline,
                   StopServiceEvent 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(Pipeline<LifetimeHandler> pipeline,
                    ServiceEvent<LifetimeHandler> e)
Description copied from interface: ServiceHandler
Processes a given event.

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


Copyright © 2013. All Rights Reserved.