public abstract class StoppableTaskBase extends java.lang.Object implements StoppableTask
| Constructor and Description |
|---|
StoppableTaskBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stops the task
|
protected abstract void |
doClose()
Implement this method for the cleanup purposes.
|
protected abstract void |
invoke()
The task invocation method.
|
boolean |
isClosed() |
void |
run() |
public void close()
throws java.io.IOException
StoppableTaskclose in interface StoppableTaskclose in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException - if some kind of failure occuredpublic void run()
run in interface java.lang.Runnablepublic final boolean isClosed()
isClosed in interface StoppableTaskprotected abstract void invoke()
protected abstract void doClose()
throws java.io.IOException
java.io.IOException