java.lang.Object
net.i2p.client.streaming.impl.SchedulerImpl
net.i2p.client.streaming.impl.SchedulerReceived
- All Implemented Interfaces:
TaskScheduler
Scheduler used after receiving an inbound connection but before we have sent our own SYN.
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 connections awaiting our own SYN.Method Summary
All MethodsModifier and TypeMethodDescriptionbooleanaccept(Connection con) Accept connections that have received a SYN but haven't sent one.voideventOccurred(Connection con) Handle an event on a received 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
SchedulerReceived
Sets up the scheduler for connections awaiting our own SYN.- Parameters:
ctx- the application context supplying the clock and log used by the scheduler
Method Details
accept
Accept connections that have received a SYN but haven't sent one.- Parameters:
con- the connection to check- Returns:
- true if the connection is in the received state
eventOccurred
Handle an event on a received connection. Sends the SYN when the send delay has elapsed.- Parameters:
con- the connection that had an event