Module org.snmp4j
Package org.snmp4j.util
Class MultiThreadedMessageDispatcher.MessageTask<A extends Address>
- java.lang.Object
-
- org.snmp4j.util.MultiThreadedMessageDispatcher.MessageTask<A>
-
- All Implemented Interfaces:
java.lang.Runnable,WorkerTask
- Enclosing class:
- MultiThreadedMessageDispatcher
class MultiThreadedMessageDispatcher.MessageTask<A extends Address> extends java.lang.Object implements WorkerTask
-
-
Field Summary
Fields Modifier and Type Field Description private AincomingAddressprivate TransportMapping<? super A>sourceTransportprivate TransportStateReferencetmStateReferenceprivate java.nio.ByteBufferwholeMessage
-
Constructor Summary
Constructors Constructor Description MessageTask(TransportMapping<? super A> sourceTransport, A incomingAddress, java.nio.ByteBuffer wholeMessage, TransportStateReference tmStateReference)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinterrupt()Interrupts this task.voidjoin()Waits until this task has been finished.voidrun()voidterminate()TheWorkerPoolmight call this method to hint the activeWorkTaskinstance to complete execution as soon as possible.
-
-
-
Field Detail
-
sourceTransport
private final TransportMapping<? super A extends Address> sourceTransport
-
wholeMessage
private final java.nio.ByteBuffer wholeMessage
-
tmStateReference
private final TransportStateReference tmStateReference
-
-
Constructor Detail
-
MessageTask
public MessageTask(TransportMapping<? super A> sourceTransport, A incomingAddress, java.nio.ByteBuffer wholeMessage, TransportStateReference tmStateReference)
-
-
Method Detail
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
terminate
public void terminate()
Description copied from interface:WorkerTaskTheWorkerPoolmight call this method to hint the activeWorkTaskinstance to complete execution as soon as possible.- Specified by:
terminatein interfaceWorkerTask
-
join
public void join() throws java.lang.InterruptedExceptionDescription copied from interface:WorkerTaskWaits until this task has been finished.- Specified by:
joinin interfaceWorkerTask- Throws:
java.lang.InterruptedException- if the join has been interrupted by another thread.
-
interrupt
public void interrupt()
Description copied from interface:WorkerTaskInterrupts this task.- Specified by:
interruptin interfaceWorkerTask- See Also:
Thread.interrupt()
-
-