java.lang.Object
org.snmp4j.transport.DTLSTM.HandshakeTask
- All Implemented Interfaces:
Runnable,WorkerTask
- Enclosing class:
DTLSTM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final longprivate final Objectprivate final intprivate final SocketAddressprivate final DatagramPacketprivate intprivate final DatagramSocketprivate final DTLSTM.SocketEntry -
Constructor Summary
ConstructorsConstructorDescriptionHandshakeTask(DTLSTM.SocketEntry socketEntry, DatagramSocket socket, SocketAddress peerAddr, DatagramPacket receivedPacket, long handshakeTimeout, int maxRetries) -
Method Summary
-
Field Details
-
endLoops
private boolean endLoops -
joinLock
-
socketEntry
-
socket
-
peerAddr
-
receivedPacket
-
handshakeTimeout
private final long handshakeTimeout -
maxRetries
private final int maxRetries -
retries
private int retries
-
-
Constructor Details
-
HandshakeTask
public HandshakeTask(DTLSTM.SocketEntry socketEntry, DatagramSocket socket, SocketAddress peerAddr, DatagramPacket receivedPacket, long handshakeTimeout, int maxRetries)
-
-
Method Details
-
run
public void run() -
stopLoops
private void stopLoops() -
terminate
public void terminate()TheWorkerPoolmight call this method to hint the activeWorkTaskinstance to complete execution as soon as possible.- Specified by:
terminatein interfaceWorkerTask
-
join
Waits until this task has been finished.- Specified by:
joinin interfaceWorkerTask- Throws:
InterruptedException- if the join has been interrupted by another thread.
-
interrupt
public void interrupt()Interrupts this task.- Specified by:
interruptin interfaceWorkerTask- See Also:
-