java.lang.Object
net.i2p.client.streaming.impl.SchedulerImpl
net.i2p.client.streaming.impl.SchedulerHardDisconnected
- All Implemented Interfaces:
TaskScheduler
Scheduler used after we've locally done a hard disconnect, but the final timeout hasn't passed.
Entry conditions:
- Locally disconnected hard.
- 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
ConstructorsConstructorDescriptionHands the application context to the superclass.Method Summary
All MethodsModifier and TypeMethodDescriptionbooleanaccept(Connection con) Accept connections that have been locally hard disconnected or sent a RESET, and the final timeout hasn't passed.voideventOccurred(Connection con) Handle an event on a hard-disconnected connection.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
SchedulerHardDisconnected
Hands the application context to the superclass.- Parameters:
ctx- application context the connection scheduler runs under
Method Details
accept
Accept connections that have been locally hard disconnected or sent a RESET, and the final timeout hasn't passed.- Parameters:
con- the connection to check- Returns:
- true if the connection is in the hard disconnected state
eventOccurred
Handle an event on a hard-disconnected connection. No-op since timeout is handled by the simpleTimer.- Parameters:
con- the connection that had an event