java.lang.Object
net.i2p.client.streaming.impl.SchedulerImpl
net.i2p.client.streaming.impl.SchedulerClosed
All Implemented Interfaces:
TaskScheduler

class SchedulerClosedextends SchedulerImpl

Scheduler used for after both sides have had their close packets ACKed, but the final timeout hasn't passed.

Entry conditions:

  • Both sides have closed and ACKed.
  • Less than the final timeout period has passed since the last ACK.

Events:

  • Packets received
  • RESET received
  • Message sending fails (error talking to the session)

Next states:

  • dead - after the final timeout passes
  • Constructor Details

    • SchedulerClosed

      public SchedulerClosed(I2PAppContext ctx)
      Creates the closed-connection scheduler for the given application context.
      Parameters:
      ctx - the context supplying the router, client and clock services
  • Method Details

    • accept

      public boolean accept(Connection con)
      Accept connections where both sides have closed and ACKed, and the final timeout hasn't passed.
      Parameters:
      con - the connection to check
      Returns:
      true if the connection is in the closed state
    • eventOccurred

      public void eventOccurred(Connection con)
      Handles the scheduler event; a no-op as the timeout is handled by the timer.
      Parameters:
      con - the connection on which the event occurred