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

@param timeout is the timeout.
@return the {@link OutbindRequest}.
@throws IllegalStateException if this invocation of this method has been made or invoke when state is not OPEN.
@throws TimeoutException      if the timeout has been reach and {@link SMPPOutboundServerSession} are no more valid because
the connection will be close automatically.