Package com.example.bot
Class BotTimerTask
java.lang.Object
java.util.TimerTask
com.example.bot.BotTimerTask
- All Implemented Interfaces:
Runnable
The BotTimerTask class extends TimerTask and represents a timer task for sending messages to clients.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the list of clients associated with the timer task.void
run()
Executes the timer task by sending random messages to clients.void
setClients
(List<Client> clients) Sets the list of clients for the timer task.Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
BotTimerTask
public BotTimerTask()
-
-
Method Details
-
run
public void run()Executes the timer task by sending random messages to clients. -
setClients
Sets the list of clients for the timer task.- Parameters:
clients
- the list of clients to set
-
getClients
Retrieves the list of clients associated with the timer task.- Returns:
- the list of clients
-