public class ShutdownMonitor extends Object
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.
Modifier and Type | Method and Description |
---|---|
static void |
deregister(LifeCycle lifeCycle) |
static ShutdownMonitor |
getInstance() |
String |
getKey() |
int |
getPort() |
ServerSocket |
getServerSocket() |
protected boolean |
isAlive() |
boolean |
isExitVm() |
static boolean |
isRegistered(LifeCycle lifeCycle) |
static void |
register(LifeCycle... lifeCycles) |
void |
setDebug(boolean flag) |
void |
setExitVm(boolean exitVm) |
void |
setKey(String key) |
void |
setPort(int port) |
protected void |
start() |
String |
toString() |
public static ShutdownMonitor getInstance()
public static void register(LifeCycle... lifeCycles)
public static void deregister(LifeCycle lifeCycle)
public static boolean isRegistered(LifeCycle lifeCycle)
public String getKey()
public int getPort()
public ServerSocket getServerSocket()
public boolean isExitVm()
public void setDebug(boolean flag)
public void setExitVm(boolean exitVm)
exitVm
- public void setKey(String key)
public void setPort(int port)
protected boolean isAlive()
Copyright © 1995-2015 Webtide. All Rights Reserved.