public OutbindRequest waitForOutbind ( long timeout ) throws IllegalStateException , TimeoutException { SessionState currentSessionState = getSessionState ( ) ; if ( currentSessionState . equals ( SessionState . OPEN ) ) { new SMPPOutboundServerSession . PDUReaderWorker ( ) . start ( ) ; try { return outbindRequestReceiver . waitForRequest ( timeout ) ; } catch ( IllegalStateException e ) { throw new IllegalStateException ( "Invocation of waitForOutbind() has been made" , e ) ; } catch ( TimeoutException e ) { close ( ) ; throw e ; } } else { throw new IllegalStateException ( "waitForOutbind() should be invoked on OPEN state, actual state is " + currentSessionState ) ; } }
Wait for outbind request .