Class ShutdownMonitor
java.lang.Object
org.eclipse.jetty.server.ShutdownMonitor
Shutdown/Stop Monitor thread.
This thread listens on the host/port specified by the STOP.HOST/STOP.PORT system parameter (defaults to 127.0.0.1/-1 for not listening) for request authenticated with the key given by the STOP.KEY system parameter 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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidawait()protected booleanstatic voidderegister(LifeCycle lifeCycle) static ShutdownMonitorgetKey()intgetPort()protected booleanisAlive()booleanisExitVm()static booleanisRegistered(LifeCycle lifeCycle) static voidprotected static voidreset()voidsetDebug(boolean flag) voidsetExitVm(boolean exitVm) Set true to exit the VM on shutdown.voidvoidsetPort(int port) voidstart()toString()
-
Method Details
-
getInstance
-
reset
protected static void reset() -
register
-
deregister
-
isRegistered
-
getKey
-
getPort
public int getPort() -
isExitVm
public boolean isExitVm() -
setDebug
public void setDebug(boolean flag) -
setExitVm
public void setExitVm(boolean exitVm) Set true to exit the VM on shutdown.- Parameters:
exitVm- true to exit the VM on shutdown
-
setKey
-
setPort
public void setPort(int port) -
start
-
await
- Throws:
InterruptedException
-
await
- Throws:
InterruptedException
-
isAlive
protected boolean isAlive() -
toString
-