java.lang.Object
net.i2p.client.streaming.impl.SchedulerImpl
net.i2p.client.streaming.impl.SchedulerClosed
- All Implemented Interfaces:
TaskScheduler
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
Field Summary
Fields inherited from class SchedulerImpl
_context, _logModifier and TypeFieldDescriptionprotected final I2PAppContextApplication context the scheduled connections live in.protected final LogLogger scoped to this scheduler class.Constructor Summary
ConstructorsConstructorDescriptionCreates the closed-connection scheduler for the given application context.Method Summary
All MethodsModifier and TypeMethodDescriptionbooleanaccept(Connection con) Accept connections where both sides have closed and ACKed, and the final timeout hasn't passed.voideventOccurred(Connection con) Handles the scheduler event; a no-op as the timeout is handled by the timer.Methods inherited from class SchedulerImpl
reschedule, toStringModifier and TypeMethodDescriptionprotected voidreschedule(long msToWait, Connection con) Schedule a connection event to occur after the specified delay.toString()Name of the scheduler class.
Constructor Details
SchedulerClosed
Creates the closed-connection scheduler for the given application context.- Parameters:
ctx- the context supplying the router, client and clock services
Method Details
accept
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
Handles the scheduler event; a no-op as the timeout is handled by the timer.- Parameters:
con- the connection on which the event occurred