- java.lang.Object
-
- org.snmp4j.transport.DummyTransport.QueueProcessor
-
- All Implemented Interfaces:
java.lang.Runnable
,WorkerTask
- Enclosing class:
- DummyTransport<A extends IpAddress>
private class DummyTransport.QueueProcessor extends java.lang.Object implements WorkerTask
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Queue<DummyTransport.MessageContainer>
queue
private boolean
stop
private AbstractTransportMapping<A>
tm
-
Constructor Summary
Constructors Constructor Description QueueProcessor(java.util.Queue<DummyTransport.MessageContainer> queue, AbstractTransportMapping<A> tm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
interrupt()
Interrupts this task.void
join()
Waits until this task has been finished.void
run()
void
terminate()
TheWorkerPool
might call this method to hint the activeWorkTask
instance to complete execution as soon as possible.
-
-
-
Field Detail
-
stop
private volatile boolean stop
-
queue
private java.util.Queue<DummyTransport.MessageContainer> queue
-
tm
private AbstractTransportMapping<A extends IpAddress> tm
-
-
Constructor Detail
-
QueueProcessor
public QueueProcessor(java.util.Queue<DummyTransport.MessageContainer> queue, AbstractTransportMapping<A> tm)
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
terminate
public void terminate()
Description copied from interface:WorkerTask
TheWorkerPool
might call this method to hint the activeWorkTask
instance to complete execution as soon as possible.- Specified by:
terminate
in interfaceWorkerTask
-
join
public void join() throws java.lang.InterruptedException
Description copied from interface:WorkerTask
Waits until this task has been finished.- Specified by:
join
in interfaceWorkerTask
- Throws:
java.lang.InterruptedException
- if the join has been interrupted by another thread.
-
interrupt
public void interrupt()
Description copied from interface:WorkerTask
Interrupts this task.- Specified by:
interrupt
in interfaceWorkerTask
- See Also:
Thread.interrupt()
-
-