public void setBody(ByteBuffer buffer) throws NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException, PDUException { if (getCommandStatus() == 0) { // ok => have body setSystemId(buffer.removeCString()); } }
public void setSystemId(String sysId) throws WrongLengthOfStringException { checkString(sysId, Data.SM_SYSID_LEN); systemId = sysId; }
public String debugString() { String dbgs = "(bindresp: "; dbgs += super.debugString(); dbgs += getSystemId(); if (hasScInterfaceVersion()) { dbgs += " "; try { dbgs += getScInterfaceVersion(); } catch (Exception e) { // don't want to throw exception in debug code! } } dbgs += ") "; return dbgs; } }
System.out.println("Bind response " + response.debugString()); if (response.getCommandStatus() == Data.ESME_ROK) { bound = true; } else { System.out.println("Bind failed, code " + response.getCommandStatus());
receiver = new Receiver(transmitter, connection); BindResponse bindResp = (BindResponse) send(bindReq, false); bound = ((bindResp != null) && (bindResp.getCommandStatus() == Data.ESME_ROK)); if (!bound) {
bindResponse.setSystemId(SYSTEM_ID);
public BindResponse(int commandId) { super(commandId); registerOptional(scInterfaceVersion); }
public ByteBuffer getBody() { ByteBuffer buffer = new ByteBuffer(); //if (getCommandStatus() == 0) { // ok => append body buffer.appendCString(getSystemId()); //} return buffer; }
response = session.bind(request); System.out.println("Bind response " + response.debugString()); if (response.getCommandStatus() == Data.ESME_ROK) { bound = true;