ecologylab.services.distributed.impl
Interface Shutdownable

All Known Implementing Classes:
AbstractNIOServer, BrowserServices, DoubleThreadedAuthNIOServer, DoubleThreadedNIOServer, HttpGetServer, HTTPPostServer, Manager, NIOLoggingServer, ServicesServer, ServicesServerBase, WebLaunchAppServer

public interface Shutdownable

Interface for objects that should have a shutdown sequence.

Author:
Zachary O. Toups (toupsz@cs.tamu.edu)

Field Summary
static java.lang.String SHUTTING_DOWN
           
 
Method Summary
 void addDependentShutdownable(Shutdownable s)
          This method allows another application to indicate its dependence on this to be shutdown.
 void addShutdownListener(java.awt.event.ActionListener l)
          This method allows other components to be notified when the shutdown() method is called.
 void shutdown()
          Causes this to start to shutdown, and fires a SHUTTING_DOWN event to all listeners.
 

Field Detail

SHUTTING_DOWN

static final java.lang.String SHUTTING_DOWN
See Also:
Constant Field Values
Method Detail

shutdown

void shutdown()
Causes this to start to shutdown, and fires a SHUTTING_DOWN event to all listeners.


addDependentShutdownable

void addDependentShutdownable(Shutdownable s)
This method allows another application to indicate its dependence on this to be shutdown. That is, when this's shutdown() method is called, it should call the shutdown() method on each component that depends on it. Implementors and callers should take care not to create an infinite loop of shutdown() calls through this method.

Parameters:
s -

addShutdownListener

void addShutdownListener(java.awt.event.ActionListener l)
This method allows other components to be notified when the shutdown() method is called. Listeners will get an ActionEvent whose action command is SHUTTING_DOWN.

Parameters:
l -