public class StopWait extends Object
The default timeout is 5 seconds before a FailedToStopException
is thrown.
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.