org.jboss.jca.core.spi.graceful

## Interface GracefulShutdown

- All Known Subinterfaces:
    DistributedWorkManager, WorkManager

      public interface GracefulShutdown

  The SPI for graceful shutdown
  Author:
    Jesper Pedersen

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancelShutdown()` Cancel shutdown
    `int` | `getDelay()` Get the delay until shutdown occurs
    `boolean` | `isShutdown()` Is the component shutdown
    `void` | `prepareShutdown()` Signal the component to prepare for shutdown
    `void` | `prepareShutdown(GracefulCallback cb)` Signal the component to prepare for shutdown
    `void` | `prepareShutdown(int shutdown)` Signal the component to prepare for shutdown
    `void` | `prepareShutdown(int shutdown, GracefulCallback cb)` Signal the component to prepare for shutdown
    `void` | `shutdown()` Shutdown the component

- - ### Method Detail

    - #### cancelShutdown

          boolean cancelShutdown()

      Cancel shutdown
      Returns:
        True if the shutdown was canceled; false otherwise

    - #### prepareShutdown

          void prepareShutdown()

      Signal the component to prepare for shutdown

    - #### prepareShutdown

          void prepareShutdown(GracefulCallback cb)

      Signal the component to prepare for shutdown
      Parameters:
        `cb` - The callback handle

    - #### prepareShutdown

          void prepareShutdown(int shutdown)

      Signal the component to prepare for shutdown
      Parameters:
        `shutdown` - The number of seconds after which shutdown is forced

    - #### prepareShutdown

          void prepareShutdown(int shutdown,
                               GracefulCallback cb)

      Signal the component to prepare for shutdown
      Parameters:
        `shutdown` - The number of seconds after which shutdown is forced
        `cb` - The callback handle

    - #### shutdown

          void shutdown()

      Shutdown the component

    - #### isShutdown

          boolean isShutdown()

      Is the component shutdown
      Returns:
        True if shutdown; false if active

    - #### getDelay

          int getDelay()

      Get the delay until shutdown occurs
      Returns:
        The number of seconds, `Integer.MAX_VALUE` for active, or `Integer.MIN_VALUE` for inactive

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)