Package org.hobbit.utils
Interface Terminatable
-
- All Known Subinterfaces:
TerminatableRunnable
- All Known Implementing Classes:
DataReceiverImpl.MsgReceivingTask
public interface TerminatableSimple interface for something that can be terminated, e.g., a running process. The difference toCloseableis that a termination does not have to happen while theterminate()method is closed.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisTerminated()Returns a flag whether the object has been asked to terminate.voidterminate()Informs the object that it should terminate.
-
-
-
Method Detail
-
isTerminated
boolean isTerminated()
Returns a flag whether the object has been asked to terminate. Note that if the method returnstrue, it does not have to be terminated.- Returns:
- returns
trueif it received a request to terminate
-
terminate
void terminate()
Informs the object that it should terminate. Note that there is no guarantee that the termination will happen while this method is running, i.e., this method is not blocking and won't wait for the object to terminate.
-
-