Package org.hobbit.core.rabbit
Class DataReceiverImpl.MsgReceivingTask
- java.lang.Object
-
- org.hobbit.core.rabbit.DataReceiverImpl.MsgReceivingTask
-
- All Implemented Interfaces:
Runnable,Terminatable,TerminatableRunnable
- Enclosing class:
- DataReceiverImpl
protected class DataReceiverImpl.MsgReceivingTask extends Object implements TerminatableRunnable
-
-
Field Summary
Fields Modifier and Type Field Description private com.rabbitmq.client.QueueingConsumerconsumerprivate booleanrunFlagprivate booleanterminatedFlag
-
Constructor Summary
Constructors Constructor Description MsgReceivingTask(com.rabbitmq.client.QueueingConsumer consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisTerminated()Returns a flag whether the object has been asked to terminate.voidrun()voidterminate()Informs the object that it should terminate.
-
-
-
Method Detail
-
terminate
public void terminate()
Description copied from interface:TerminatableInforms 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.- Specified by:
terminatein interfaceTerminatable
-
isTerminated
public boolean isTerminated()
Description copied from interface:TerminatableReturns a flag whether the object has been asked to terminate. Note that if the method returnstrue, it does not have to be terminated.- Specified by:
isTerminatedin interfaceTerminatable- Returns:
- returns
trueif it received a request to terminate
-
-