|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jChatBox.Chat.ChatroomTimer
This class generates periodical chatroom events for ChatroomTimerListener. It runs (in a thread) until the matching chatroom is closed of period is set to -1. It generates trigger event before sleeping the period (milliseconds) of time.
Constructor Summary | |
ChatroomTimer(Chatroom room,
ChatroomTimerListener listener)
Constructor from a given chatroom and listener. |
Method Summary | |
Chatroom |
getChatroom()
Return chatroom matching the ChatroomTimer. |
ChatroomTimerListener |
getListener()
Return listener to be notified. |
long |
getPeriod()
Return timer's period |
void |
run()
Main thread loop. |
void |
setPeriod(long period)
Set period of timer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChatroomTimer(Chatroom room, ChatroomTimerListener listener)
room
- listener
- Method Detail |
public long getPeriod()
public void setPeriod(long period)
period
- -1 will stop the timer.public Chatroom getChatroom()
public ChatroomTimerListener getListener()
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |