bb.net
Class NetUtil.UnitTest.ServerSocketConnector

java.lang.Object
  extended by 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).
 
Constructor Summary
NetUtil.UnitTest.ServerSocketConnector(ServerSocket serverSocket)
           
 
Method Summary
 void run()
           
private  void stopWaiting()
           
private  void waitTillNotified()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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).

Constructor Detail

NetUtil.UnitTest.ServerSocketConnector

NetUtil.UnitTest.ServerSocketConnector(ServerSocket serverSocket)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

waitTillNotified

private void waitTillNotified()
                       throws InterruptedException
Throws:
InterruptedException

stopWaiting

private void stopWaiting()