org.gcube.smartgears.handlers.application
Class ApplicationLifecycleHandler

java.lang.Object
  extended by org.gcube.smartgears.handlers.AbstractHandler
      extended by org.gcube.smartgears.handlers.application.ApplicationLifecycleHandler
All Implemented Interfaces:
ApplicationHandler<ApplicationLifecycleHandler>, Handler<ApplicationEvent<ApplicationLifecycleHandler>>
Direct Known Subclasses:
ProfileManager

public abstract class ApplicationLifecycleHandler
extends AbstractHandler
implements ApplicationHandler<ApplicationLifecycleHandler>

A Handler of ApplicationLifecycleEvents.

The handler participates in a ApplicationPipeline 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 ApplicationPipeline ApplicationPipeline#forward(ApplicationEvent).

Author:
Fabio Simeoni
See Also:
ApplicationLifecycleEvent, ApplicationPipeline

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

Constructor Detail

ApplicationLifecycleHandler

public ApplicationLifecycleHandler()
Method Detail

onStart

public void onStart(ApplicationLifecycleEvent.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(ApplicationLifecycleEvent.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<ApplicationLifecycleHandler> e)
Description copied from interface: Handler
Processes a given event.

Specified by:
onEvent in interface Handler<ApplicationEvent<ApplicationLifecycleHandler>>


Copyright © 2013. All Rights Reserved.