Class TcpPacketSender

  • All Implemented Interfaces:
    Runnable, ActiveObject

    public final class TcpPacketSender
    extends AbstractTcpPacketHandler
    implements Runnable

    Thread handling the outgoing traffic of a TCP socket. The TcpPacketSender is also responsible for sending keep-alive pings when the connection is idle.

    • Method Detail

      • needsThrottling

        public boolean needsThrottling()
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • getTimeoutDelay

        public long getTimeoutDelay()
        Description copied from interface: ActiveObject
        Get the maximum allowed time between activities
        Specified by:
        getTimeoutDelay in interface ActiveObject
        Returns:
        a delay in milliseconds
      • onActivityTimeout

        public boolean onActivityTimeout()
                                  throws Exception
        Description copied from interface: ActiveObject
        Called if the object has been inactive for more
        Specified by:
        onActivityTimeout in interface ActiveObject
        Returns:
        true if the object should be unregistered immediately upon return
        Throws:
        Exception
      • pleaseStop

        public void pleaseStop()