java.lang.Object
net.i2p.client.streaming.impl.SchedulerImpl
net.i2p.client.streaming.impl.SchedulerConnectedBulk
- All Implemented Interfaces:
TaskScheduler
Scheduler used for after our SYN has been sent and ACKed but one (or more) sides haven't closed the stream yet. In addition, the stream must be using the BULK profile, rather than the INTERACTIVE profile.
Entry conditions:
- Packets sent and ACKs received.
- At least one direction is not closed
Events:
- Packets received (which may or may not ACK the ones sent)
- Message flush (explicitly, through a full buffer, or stream closure)
- RESET received
- Message sending fails (error talking to the session)
- Message sending fails (too many resends)
Next states:
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
ConstructorsConstructorDescriptionSets up the scheduler for established bulk-profile connections.Method Summary
All MethodsModifier and TypeMethodDescriptionbooleanaccept(Connection con) Accept connections that are established, using the bulk profile, and not yet closing.voideventOccurred(Connection con) Handle an event on a connected bulk 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
SchedulerConnectedBulk
Sets up the scheduler for established bulk-profile connections.- Parameters:
ctx- application context, passed to the SchedulerImpl superclass
Method Details
accept
Accept connections that are established, using the bulk profile, and not yet closing.- Parameters:
con- the connection to check- Returns:
- true if the connection is in the connected bulk state
eventOccurred
Handle an event on a connected bulk connection. If the send time has arrived, send available data. Otherwise reschedule.- Parameters:
con- the connection that had an event