org.d_haven.event.command
Interface RepeatedCommand
public
interface
RepeatedCommand
extends DelayedCommand
The RepeatedCommand is used to represent a command that operates at a
specified interval over time. It gives the affect of being a long
running process without tying up a thread waiting for the next time
to run the command.
Author: Berin Loritsch
Method Summary |
int | getNumberOfRepeats()
If the value is less than 1 (0 or negative), the command repeats
for as long as the DefaultCommandManager is running. |
long | getRepeatInterval()
Gets the repeat interval so that the CommandQueue keeps it for
the specified amount of time before enqueuing it again. |
public int getNumberOfRepeats()
If the value is less than 1 (0 or negative), the command repeats
for as long as the DefaultCommandManager is running. If the
value is above 0, the Command repeats only for that specific
amount of times before it is removed from the system.
Returns: the number of times the command repeats
public long getRepeatInterval()
Gets the repeat interval so that the CommandQueue keeps it for
the specified amount of time before enqueuing it again. This
value must not be negative.
Returns: the number of milliseconds between each repeat