Module org.snmp4j

Class SocketTimeout<A extends Address>

  • All Implemented Interfaces:
    java.lang.Runnable

    public class SocketTimeout<A extends Address>
    extends java.util.TimerTask
    The SocketTimeout is a TimerTask that provides means to detect when a socket is not used for predefined time and then close the socket and free its resources.
    Since:
    3.0
    Author:
    Frank Fock
    • Method Detail

      • run

        public void run()
        Runs a timeout check and if the socket has timed out, it removes the socket from the associated TransportMapping.
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class java.util.TimerTask
      • cancel

        public boolean cancel()
        Overrides:
        cancel in class java.util.TimerTask