Module org.snmp4j

Class DTLSTM.HandshakeTask

  • All Implemented Interfaces:
    java.lang.Runnable, WorkerTask
    Enclosing class:
    DTLSTM

    class DTLSTM.HandshakeTask
    extends java.lang.Object
    implements WorkerTask
    • Constructor Summary

      Constructors 
      Constructor Description
      HandshakeTask​(DTLSTM.SocketEntry socketEntry, java.net.DatagramSocket socket, java.net.SocketAddress peerAddr, java.net.DatagramPacket receivedPacket, long handshakeTimeout, int maxRetries)  
    • 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()  
      private void stopLoops()  
      void terminate()
      The WorkerPool might call this method to hint the active WorkTask instance to complete execution as soon as possible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • endLoops

        private boolean endLoops
      • joinLock

        private final java.lang.Object joinLock
      • socket

        private final java.net.DatagramSocket socket
      • peerAddr

        private final java.net.SocketAddress peerAddr
      • receivedPacket

        private final java.net.DatagramPacket receivedPacket
      • handshakeTimeout

        private final long handshakeTimeout
      • maxRetries

        private final int maxRetries
      • retries

        private int retries
    • Constructor Detail

      • HandshakeTask

        public HandshakeTask​(DTLSTM.SocketEntry socketEntry,
                             java.net.DatagramSocket socket,
                             java.net.SocketAddress peerAddr,
                             java.net.DatagramPacket receivedPacket,
                             long handshakeTimeout,
                             int maxRetries)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • stopLoops

        private void stopLoops()
      • terminate

        public void terminate()
        The WorkerPool might call this method to hint the active WorkTask instance to complete execution as soon as possible.
        Specified by:
        terminate in interface WorkerTask
      • join

        public void join()
                  throws java.lang.InterruptedException
        Waits until this task has been finished.
        Specified by:
        join in interface WorkerTask
        Throws:
        java.lang.InterruptedException - if the join has been interrupted by another thread.
      • interrupt

        public void interrupt()
        Interrupts this task.
        Specified by:
        interrupt in interface WorkerTask
        See Also:
        Thread.interrupt()