public interface Stoppable
Provides a mechanism to stop the processing before completion. When an operation is stopped it will either exit normally or throw the runtime exception
Stoppable.Stopped. In either case the function
isStopRequested()will return true. A class which has been stopped early can often be called be called again, but the stop request flag is typically reset internally and a few milliseconds should be provided for the process to launch and be reset. The only way to tell if a process has stopped is to observe that the next operation after it has been called.
Nested Class SummaryModifier and TypeInterfaceDescription
static classException which is thrown when a process has been stopped early.
requestStopvoid requestStop()Invoke to request that the process stop running. The process will not immediately stop and an undefined amount of time will pass before it has stopped.
isStopRequestedboolean isStopRequested()True if a request to stop has been sent. If a stopped process is invoked again this flag might not be immediately reset. This bit of amiguity is done to greatly simplify implementation of this interface.
- true if a stop request has been sent