public String debugString() { String dbgs = "(cancel: "; dbgs += super.debugString(); dbgs += getServiceType(); dbgs += " "; dbgs += getMessageId(); dbgs += " "; dbgs += getSourceAddr().debugString(); dbgs += " "; dbgs += getDestAddr().debugString(); dbgs += ") "; return dbgs; } }
public void setDestAddr(String address) throws WrongLengthOfStringException { setDestAddr(new Address(address)); } public void setDestAddr(byte ton, byte npi, String address) throws WrongLengthOfStringException {
public void setSourceAddr(String address) throws WrongLengthOfStringException { setSourceAddr(new Address(address)); } public void setSourceAddr(byte ton, byte npi, String address) throws WrongLengthOfStringException {
debug.enter(this, "SMPPTest.cancel()"); try { CancelSM request = new CancelSM(); CancelSMResp response; request.setServiceType(serviceType); request.setMessageId(messageId); request.setSourceAddr(sourceAddress); request.setDestAddr(destAddress); System.out.println("Cancel request " + request.debugString()); if (asynchronous) { session.cancel(request);
public void setBody(ByteBuffer buffer) throws NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException, PDUException { setServiceType(buffer.removeCString()); setMessageId(buffer.removeCString()); sourceAddr.setData(buffer); // ? destAddr.setData(buffer); // ? }
public ByteBuffer getBody() { ByteBuffer buffer = new ByteBuffer(); buffer.appendCString(getServiceType()); buffer.appendCString(messageId); buffer.appendBuffer(getSourceAddr().getData()); buffer.appendBuffer(getDestAddr().getData()); return buffer; }
CancelSM cancelRequest = (CancelSM) request; display("cancelling message in message store"); messageStore.cancel(cancelRequest.getMessageId()); break;
public void setMessageId(String value) throws WrongLengthOfStringException { checkString(value, Data.SM_MSGID_LEN); messageId = value; }
public void setServiceType(String value) throws WrongLengthOfStringException { checkCString(value, Data.SM_SRVTYPE_LEN); serviceType = value; }
public void setSourceAddr(byte ton, byte npi, String address) throws WrongLengthOfStringException { setSourceAddr(new Address(ton, npi, address)); }
public void setDestAddr(byte ton, byte npi, String address) throws WrongLengthOfStringException { setDestAddr(new Address(ton, npi, address)); }