bb.net
Class NetUtil.UnitTest.ServerSocketConnector
java.lang.Object
bb.net.NetUtil.UnitTest.ServerSocketConnector
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- NetUtil.UnitTest
private static class NetUtil.UnitTest.ServerSocketConnector
- extends Object
- implements Runnable
Creates a normal client Socket to serverSocket
, and then waits until stopWaiting
is called.
Field Summary |
private ServerSocket |
serverSocket
|
private boolean |
shouldWait
Condition predicate for this instance's condition queue (i.e. the wait/notifyAll calls below; see "Java Concurrency in Practice" by Goetz et al p. 296ff, especially p. 299). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serverSocket
private final ServerSocket serverSocket
shouldWait
private boolean shouldWait
- Condition predicate for this instance's condition queue (i.e. the wait/notifyAll calls below; see "Java Concurrency in Practice" by Goetz et al p. 296ff, especially p. 299).
NetUtil.UnitTest.ServerSocketConnector
NetUtil.UnitTest.ServerSocketConnector(ServerSocket serverSocket)
run
public void run()
- Specified by:
run
in interface Runnable
waitTillNotified
private void waitTillNotified()
throws InterruptedException
- Throws:
InterruptedException
stopWaiting
private void stopWaiting()