public class RestartingStateListener
extends java.lang.Object
implements org.opendof.core.oal.DOFServer.StateListener
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAXIMUM_DELAY |
static int |
DEFAULT_MINIMUM_DELAY |
static int |
MINIMUM_DELAY |
| Constructor and Description |
|---|
RestartingStateListener()
Default constructor starts the listener thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Shut down the listener.
|
int |
getMaximumDelay() |
int |
getMinimumDelay() |
void |
removed(org.opendof.core.oal.DOFServer server,
org.opendof.core.oal.DOFException exception) |
void |
setMaximumDelay(int maximumDelay)
Sets the maximum delay time between attempts to restart a stopped server.
|
void |
setMinimumDelay(int minimumDelay)
Sets the minimum delay to wait before attempting to restart a stopped server.
|
void |
stateChanged(org.opendof.core.oal.DOFServer server,
org.opendof.core.oal.DOFServer.State state) |
public static final int DEFAULT_MINIMUM_DELAY
public static final int DEFAULT_MAXIMUM_DELAY
public static final int MINIMUM_DELAY
public RestartingStateListener()
public void setMinimumDelay(int minimumDelay)
minimumDelay - The minimum amount of time to wait between attempts to restart. Must not be negative.public int getMinimumDelay()
public void setMaximumDelay(int maximumDelay)
maximumDelay - The maximum amount of time to wait between attempts to restart. Must not be negative.setMinimumDelay(int)public int getMaximumDelay()
public void stateChanged(org.opendof.core.oal.DOFServer server,
org.opendof.core.oal.DOFServer.State state)
stateChanged in interface org.opendof.core.oal.DOFServer.StateListenerpublic void removed(org.opendof.core.oal.DOFServer server,
org.opendof.core.oal.DOFException exception)
removed in interface org.opendof.core.oal.DOFServer.StateListenerpublic void cancel()