java.lang.Object
net.i2p.util.SimpleTimer2.TimedEvent
net.i2p.router.startup.LoadClientAppsJob.DelayedRunClient
net.i2p.router.startup.LoadClientAppsJob.WaitForRunningClient
- All Implemented Interfaces:
Runnable
- Enclosing class:
LoadClientAppsJob
private static class LoadClientAppsJob.WaitForRunningClientextends LoadClientAppsJob.DelayedRunClient
Job waiting for the netdb before loading a client.
Field Summary
Fields inherited from class LoadClientAppsJob.DelayedRunClient
_ctxModifier and TypeFieldDescriptionprotected final RouterContextThe router context used to start the app when this event fires.Fields inherited from class SimpleTimer2.TimedEvent
_state, DEFAULT_FUZZModifier and TypeFieldDescriptionprotected SimpleTimer2.TimedEventStateState of the current event.protected static final intDefault fuzz threshold in milliseconds.Constructor Summary
ConstructorsConstructorDescriptionWaitForRunningClient(SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args) Builds the netdb wait job.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidWait for the router to be running, then run the configured client application.Methods inherited from class SimpleTimer2.TimedEvent
cancel, forceReschedule, reschedule, reschedule, run, schedule, setFuzz, setPool, toStringModifier and TypeMethodDescriptionbooleancancel()Cancel the timed event.voidforceReschedule(long timeoutMs) Always use the new time - ignores fuzz.voidreschedule(long timeoutMs) Use the earliest of the new time and the old time May be called from within timeReached(), but schedule() is better there.voidreschedule(long timeoutMs, boolean useEarliestTime) May be called from within timeReached(), but schedule() is better there.voidrun()voidschedule(long timeoutMs) Schedule this event.voidsetFuzz(int fuzz) Reschedule threshold in ms.voidsetPool(SimpleTimer2 pool) Timer pool for this event.toString()Timer summary for log messages.
Constructor Details
WaitForRunningClient
WaitForRunningClient(SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args) Builds the netdb wait job.- Parameters:
pool- the timer to reschedule onenclosingContext- the router contextclassName- the class name of the app to loadclientName- the name of the client app to wait forargs- the arguments for the app
Method Details
timeReached
public void timeReached()Wait for the router to be running, then run the configured client application.- Overrides:
timeReachedin classLoadClientAppsJob.DelayedRunClient