|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--de.jadv.server.manager.EventThread
The EvenThread handles the Events. Normaly there is only one EventThread running at a time!
The EventManager checks, if the Thread is still working correctly. The setCounter()
increases a counter in the EventManager, so that the EventManager knows, that the
EventThread is still working.
If Configuration.SAVE_ALL_AFTER_EVENT is set to true, the EventThread also calls
ObjectManager.saveChanged() is called after each handled event.
This thread is also responsible to get all incoming Events from the Player and
put the ClientEvents into the main EventQueue.
Field Summary | |
private EventManager |
_mgr
|
private long |
_time
|
private boolean |
handledEvent
|
private boolean |
shouldstop
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
EventThread(EventManager mgr)
|
Method Summary | |
private void |
checkPlayerEvents()
Check for incoming Events and put them all inside the EventQueue |
private void |
doEvent()
|
void |
run()
|
void |
setCounter()
setCounter() This function increases the counter of the EventManager |
void |
stopThread()
stop this thred The thread isn't stopped immediately, but a simple flag is set. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private boolean shouldstop
private EventManager _mgr
private long _time
private boolean handledEvent
Constructor Detail |
public EventThread(EventManager mgr)
Method Detail |
private void checkPlayerEvents()
private void doEvent()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setCounter()
public void stopThread()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |