BaseBindResp bindResponse = (BaseBindResp)response;
// check if the bind succeeded
if (bindResponse == null || bindResponse.getCommandStatus() != SmppConstants.STATUS_OK) {
// bind failed for a specific reason
throw new SmppBindException(bindResponse);
}
// if we make it all the way here, we're good and bound
bound = true;