|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--swpchat.util.Waiter
This class is used for inter-thread-communication. (e.g. between MessageReceiver and ReceiverServerConnection)
Field Summary | |
private boolean |
exitNow
|
private java.lang.String |
result
|
private boolean |
waiting
|
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
Waiter()
The constructor automagically starts the thread. |
Method Summary | |
void |
cont(java.lang.String message)
Tell the Waiter to stop waiting and end the thread. |
void |
run()
Waits until exitNow is set to true by waitForCont(), then the thread ends. |
java.lang.String |
waitForCont()
Waits until someone calls cont(String) and returns the String passed to cont(String). |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private boolean waiting
private boolean exitNow
private java.lang.String result
Constructor Detail |
public Waiter()
Method Detail |
public java.lang.String waitForCont()
public void cont(java.lang.String message)
message
- will be returned by waitForCont().public void run()
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |