Class ShutdownService

java.lang.Object
org.eclipse.jetty.server.ShutdownService
Direct Known Subclasses:
ShutdownMonitor

public class ShutdownService extends Object
Server Shutdown Service, which will listen to a configured Host / Port and handle commands to control the list of Jetty Component LifeCycle objects.

The commands you can send to this Server are always in US_ASCII with a CRLF (\r\n.

Supported commands:

FORCESTOP
Will stop components by calling LifeCycle.stop().
Will receive Stopped\r\n after stop, and before exit.
STOPEXIT
Will stop components by calling LifeCycle.stop(),
(Each component that is a Destroyable will also be destroyed) followed by System.exit(0); at the end.
Will receive Stopped\r\n after stop/destroy, and before exit.
EXIT
Will simply call System.exit(0); on JVM
STATUS
Will return OK\r\n to indicate ShutdownService is alive and ready to take commands.
PID
Will return PID of the running JVM from ProcessHandle.current().pid() on JVM
Since:
12.1.0