org.eclipse.jetty.server

## Class ShutdownMonitor

- java.lang.Object
- - java.lang.Thread
  - - org.eclipse.jetty.server.ShutdownMonitor

- All Implemented Interfaces:
    Runnable

      public class ShutdownMonitor
      extends Thread

  Shutdown/Stop Monitor thread.

  This thread listens on the port specified by the STOP.PORT system parameter (defaults to -1 for not listening) for request authenticated with the key given by the STOP.KEY system parameter (defaults to "eclipse") for admin requests.

  If the stop port is set to zero, then a random port is assigned and the port number is printed to stdout.

  Commands "stop" and "status" are currently supported.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `Thread.State, Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ShutdownMonitor` | `getInstance()`
    `String` | `getKey()`
    `int` | `getPort()`
    `ServerSocket` | `getServerSocket()`
    `boolean` | `isExitVm()`
    `void` | `run()`
    `void` | `setDebug(boolean flag)`
    `void` | `setExitVm(boolean exitVm)`
    `void` | `setKey(String key)`
    `void` | `setPort(int port)`
    `void` | `start()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Thread

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, yield`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static ShutdownMonitor getInstance()

    - #### getKey

          public String getKey()

    - #### getPort

          public int getPort()

    - #### getServerSocket

          public ServerSocket getServerSocket()

    - #### isExitVm

          public boolean isExitVm()

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `Thread`

    - #### setDebug

          public void setDebug(boolean flag)

    - #### setExitVm

          public void setExitVm(boolean exitVm)

    - #### setKey

          public void setKey(String key)

    - #### setPort

          public void setPort(int port)

    - #### start

          public void start()

      Overrides:
        `start` in class `Thread`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Thread`

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.