java.lang.Object
net.i2p.util.SimpleTimer2.TimedEvent
net.i2p.router.startup.LoadClientAppsJob.DelayedRunClient
net.i2p.router.web.PluginStarter.TrackedDelayedClient
- All Implemented Interfaces:
Runnable
- Enclosing class:
PluginStarter
Simple override to track whether a plugin's client is delayed and queued.
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionTrackedDelayedClient(String pluginName, SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args, ThreadGroup threadGroup, ClassLoader cl) Builds a delayed client tracked to its plugin.Method Summary
All MethodsModifier and TypeMethodDescriptionbooleancancel()Deregisters this client from the plugin when the timer is cancelled.voidDeregisters this client from the plugin when the timer fires.Methods inherited from class SimpleTimer2.TimedEvent
forceReschedule, reschedule, reschedule, run, schedule, setFuzz, setPool, toStringModifier and TypeMethodDescriptionvoidforceReschedule(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.
Field Details
_pluginName
The plugin that started the client.
Constructor Details
TrackedDelayedClient
public TrackedDelayedClient(String pluginName, SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args, ThreadGroup threadGroup, ClassLoader cl) Builds a delayed client tracked to its plugin.- Parameters:
pluginName- the plugin that started the clientpool- the timer pool to schedule onenclosingContext- the router contextclassName- the client class to runclientName- the name of the clientargs- the arguments for the clientthreadGroup- the group for the client's threadscl- the plugin's class loader
Method Details
cancel
public boolean cancel()Deregisters this client from the plugin when the timer is cancelled.- Overrides:
cancelin classSimpleTimer2.TimedEvent- Returns:
- true if the event will not execute, false if already idle/cancelled
timeReached
public void timeReached()Deregisters this client from the plugin when the timer fires.- Overrides:
timeReachedin classLoadClientAppsJob.DelayedRunClient