public class StopWait
extends java.lang.Object
The default timeout is 5 seconds before a FailedToStopException
is thrown.
Constructor and Description |
---|
StopWait(Stateful stateful)
Constructor with default timeout.
|
StopWait(Stateful stateful,
long timeout)
Constructor where timeout can be specified.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Run the stop wait.
|
public StopWait(Stateful stateful)
stateful
- The thing to wait until stopped.public StopWait(Stateful stateful, long timeout)
stateful
- The thing to wait until stopped.timeout
- The timeout. Note that a timeout of 0 or less is
no timeout.public void run() throws FailedToStopException
FailedToStopException
- If timeout occurs.