T
- the type of the Object
associated with the
PeriodicRunnable
public abstract class PeriodicRunnableWithObject<T> extends PeriodicRunnable
PeriodicRunnable
associated with an Object
.Modifier and Type | Field and Description |
---|---|
T |
o
The
Object associated with this PeriodicRunnable . |
Modifier | Constructor and Description |
---|---|
protected |
PeriodicRunnableWithObject(T o,
long period)
Initializes a new
PeriodicRunnableWithObject instance
associated with a specific Object . |
protected |
PeriodicRunnableWithObject(T o,
long period,
boolean invokeImmediately)
Initializes a new
PeriodicRunnableWithObject instance
associated with a specific Object . |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doRun()
Invoked by
run() (1) before
PeriodicRunnable._lastProcessTime is updated and (2) removing
the requirement of Runnable.run() to return a
long value with unknown/undocumented (at the time of this
writing) meaning. |
void |
run()
Updates
PeriodicRunnable._lastProcessTime . |
getLastProcessTime, getPeriod, getTimeUntilNextRun, setPeriod
public final T o
Object
associated with this PeriodicRunnable
.protected PeriodicRunnableWithObject(T o, long period, boolean invokeImmediately)
PeriodicRunnableWithObject
instance
associated with a specific Object
.o
- the Object
associated with the new instanceperiod
- the interval/period in milliseconds at which
run()
is to be invokedinvokeImmediately
- whether to invoke the runnable immediately or
wait for one period
before the first invocation.protected PeriodicRunnableWithObject(T o, long period)
PeriodicRunnableWithObject
instance
associated with a specific Object
.o
- the Object
associated with the new instanceperiod
- the interval/period in milliseconds at which
run()
is to be invokedprotected abstract void doRun()
run()
(1) before
PeriodicRunnable._lastProcessTime
is updated and (2) removing
the requirement of Runnable.run()
to return a
long
value with unknown/undocumented (at the time of this
writing) meaning.public void run()
PeriodicRunnable._lastProcessTime
.run
in interface java.lang.Runnable
run
in class PeriodicRunnable
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.