Class AbstractTimeoutHandler

  • All Implemented Interfaces:
    TimeoutHandler

    @Deprecated
    public abstract class AbstractTimeoutHandler
    extends java.lang.Object
    implements TimeoutHandler
    Deprecated.
    Don't extend this class, implement TimeoutHandler using SocketTimeoutTask instead
    A base class which provides basic support for socket timeouts. It is used instead of integrating timeouts into the NIO select thread both for simplicity and to keep code shared between NIO and blocking sockets as much as possible.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void resetTimeout()
      Deprecated.
      Resets the current progress towards timeout to 0.
      void setSocketTimeout​(java.time.Duration timeout)
      Deprecated.
      Sets the receive timeout, automatically killing the connection if no messages are received for this long
      void setTimeoutEnabled​(boolean timeoutEnabled)
      Deprecated.
      Enables or disables the timeout entirely.
      protected abstract void timeoutOccurred()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

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

      • AbstractTimeoutHandler

        public AbstractTimeoutHandler()
        Deprecated.
    • Method Detail

      • setTimeoutEnabled

        public final void setTimeoutEnabled​(boolean timeoutEnabled)
        Deprecated.

        Enables or disables the timeout entirely. This may be useful if you want to store the timeout value but wish to temporarily disable/enable timeouts.

        The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

        This call will reset the current progress towards the timeout.

        Specified by:
        setTimeoutEnabled in interface TimeoutHandler
      • setSocketTimeout

        public final void setSocketTimeout​(java.time.Duration timeout)
        Deprecated.

        Sets the receive timeout, automatically killing the connection if no messages are received for this long

        A timeout of 0Duration.ZERO is interpreted as no timeout.

        The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

        This call will reset the current progress towards the timeout.

        Specified by:
        setSocketTimeout in interface TimeoutHandler
      • resetTimeout

        protected void resetTimeout()
        Deprecated.
        Resets the current progress towards timeout to 0.
      • timeoutOccurred

        protected abstract void timeoutOccurred()
        Deprecated.