Package com.oorian.messaging.commands
Class CreateTimer
java.lang.Object
com.oorian.messaging.commands.Command
com.oorian.messaging.commands.CreateTimer
Command to create a timer on the client side.
This command creates a timer that can execute callbacks at specified intervals. Timers can be configured as one-shot or periodic, and work in conjunction with the Timer class to provide scheduled execution capabilities.
Features:
- Creates client-side timers
- Supports one-shot and periodic timers
- Configurable interval timing
- Integrates with Timer objects
Usage:
// Create a periodic timer that fires every 1000ms
Timer timer = new Timer("myTimer", 1000, true);
CreateTimer createCmd = new CreateTimer(timer);
JsonObject json = createCmd.toJson();
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreateTimer(Timer timer) Constructs a new CreateTimer command from a Timer object. -
Method Summary
Modifier and TypeMethodDescriptiontoJson()Generates the JSON representation of this create timer command.Methods inherited from class com.oorian.messaging.commands.Command
getElementId, getId, setElementId, toString
-
Constructor Details
-
CreateTimer
Constructs a new CreateTimer command from a Timer object.- Parameters:
timer- the Timer instance containing timer configuration
-
-
Method Details