Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.connecterra.util
Interface Controllable

All Known Subinterfaces:
  PhysicalDevice

All Known Implementing Classes:
  AbstractDispatchingPollingPhysicalDevice, AbstractPhysicalDevice, AbstractPollingPhysicalDevice, AbstractPrinterPhysicalReader, AlarmClock

    public interface Controllable

Classes which implement this interface provide a mechanism for managing the subsystems they represent. Currently, this is limited to methods for doing orderly shutdown and forced termination.

Method Summary
`void` | `shutdown()` Initiate whatever process is necessary to do an orderly shutdown of the subsystem.
`void` | `terminate()` Initiate whatever process is necessary to forcibly shut down the subsystem.
`void` | `waitForShutdown(long timeout)` Wait for the shutdown process initiated by `Controllable.shutdown()` to complete.
`void` | `waitForTermination(long timeout)` Wait for the termination process initiated by `Controllable.terminate()` to complete.

Method Detail

### shutdown

    void shutdown()

  Initiate whatever process is necessary to do an orderly shutdown of the subsystem. It is not necessary for this process to release resources, such as threads, in use by the subsystem, but it is permitted.

  This method should not block for a long time, so that multiple systems can be shut down in parallel.

### waitForShutdown

    void waitForShutdown(long timeout)
                         throws InterruptedException

  Wait for the shutdown process initiated by `Controllable.shutdown()` to complete.

  Parameters:
    `timeout` - If the timeout elapses before the shutdown process has completed, return anyway.
  Throws:
    `InterruptedException`

### terminate

    void terminate()

  Initiate whatever process is necessary to forcibly shut down the subsystem. This should kill threads, close network connections, and release any other resources in use by the subsystem.

  This method should not block for a long time, so that multiple systems can be shut down in parallel.

### waitForTermination

    void waitForTermination(long timeout)
                            throws InterruptedException

  Wait for the termination process initiated by `Controllable.terminate()` to complete.

  Parameters:
    `timeout` - If the timeout elapses before the shutdown process has completed, return anyway.
  Throws:
    `InterruptedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD