|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--amber.server.application.HandlePacketThread
Thread which handles the events destined for one of the ComponentHandlers. Sits on a socket, blocking until bytes are received. Transmission is handled by the ApplicationHandler itself.
ApplicationHandler, Serialized Form| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
HandlePacketThread(java.lang.ThreadGroup group,
ApplicationInterface parent)
Construct the thread, with it's parent class so it may pass back messages. |
|
| Method Summary | |
void |
addPacket(Packet packet)
Adds a packet for processing. |
void |
deactivate()
This function causes the flag to be set disabling this thread. |
ApplicationInterface |
getParent()
This function returns the parent application to which messages will be sent. |
boolean |
isActive()
Returns whether the thread is active. |
boolean |
isOperating()
Returns the state of the thread. |
void |
restart()
Forces the thread to restart. |
void |
run()
Main operating function. |
void |
setParent(ApplicationInterface parent)
This function sets the parent application to which messages will be sent. |
void |
terminate()
This function causes the flag to be set terminating this thread. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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 |
| Constructor Detail |
public HandlePacketThread(java.lang.ThreadGroup group,
ApplicationInterface parent)
group - ThreadGroup this thread belongs to.parent - ApplicationInterface which is the parent of this thread.| Method Detail |
public void restart()
public void addPacket(Packet packet)
packet - Packet to process.public void run()
run in class java.lang.Threadpublic void terminate()
public void deactivate()
public boolean isOperating()
public boolean isActive()
public void setParent(ApplicationInterface parent)
parent - ApplicationInterface which is to be the new parent.public ApplicationInterface getParent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||