ariba.util.shutdown
Interface ShutdownDelayer

All Known Implementing Classes:
AWConcreteApplication, AWDefaultApplication, AWServletApplication, AWStaticSiteGenerator.ExtendedDefaultApplication, RequestShutdownDelayer

public interface ShutdownDelayer

Instances of this interface are invoked during the asynchornous shutdown sequence. They are responsible for delaying the shutdown until the system is in a state which allows it.


Method Summary
 void cancelShutdown()
          Method invoked to indicate the cancelling of the shutdown sequence.
 boolean canShutdown()
          Specifies whether the system can safely shutdown.
 void initiateShutdown()
          Method invoked to indicate the beginning of the shutdown sequence.
 

Method Detail

initiateShutdown

void initiateShutdown()
Method invoked to indicate the beginning of the shutdown sequence. This is being called by the ShutdownManager, when an asynchronous shutdown is requested. Within this call, the application starts stopping some functionalities (for instance, new new user can login on this server) If any exception is being thrown, the delayer will be removed from the sequence.


canShutdown

boolean canShutdown()
Specifies whether the system can safely shutdown. This is being called on a regular basis by the ShutdownManager to determine whether we can exit the VM. If any exception is being thrown, the delayer will be removed from the sequence.

Returns:
true if the system can shutdown

cancelShutdown

void cancelShutdown()
Method invoked to indicate the cancelling of the shutdown sequence. This method is called by the ShutdownManager, when an asynchronous shutdown is cancelled. Within this call, the application should reverse the actions it took in initiateShutdown. The most common reason for cancelling a shutdown is the start of a rolling upgrade or rolling restart where the Ops code determines when each node is shutdown. If any exception is being thrown, the delayer will be removed from the sequence.



AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.