void waitForTransparentConnect() throws InterruptedException,
NotConnectedToServerException {
if (state == DISCONNECTED_VISIBLE) {
LOG.warn(listeningPort + ": waitForTransparentConnect: got visible" +
" disconnected state");
throw new NotConnectedToServerException();
}
// Wait until we are not hidden disconnected
while (state != CONNECTED) {
connectionLock.wait();
switch (state) {
case CONNECTED:
break;
case DISCONNECTED_HIDDEN:
continue;
case DISCONNECTED_VISIBLE:
LOG.warn(listeningPort + ": waitForTransparentConnect: got visible" +
" disconnected state");
throw new NotConnectedToServerException();
}
}
}