Package com.cloudhopper.smpp.pdu

Examples of com.cloudhopper.smpp.pdu.SubmitSmResp


            } else {
                pdu = new PartialPdu(commandId);
            }
        } else {
            if (commandId == SmppConstants.CMD_ID_SUBMIT_SM_RESP) {
                pdu = new SubmitSmResp();
            } else if (commandId == SmppConstants.CMD_ID_DELIVER_SM_RESP) {
                pdu = new DeliverSmResp();
            } else if (commandId == SmppConstants.CMD_ID_DATA_SM_RESP) {
                pdu = new DataSmResp();
            } else if (commandId == SmppConstants.CMD_ID_CANCEL_SM_RESP) {
View Full Code Here


            } else {
                pdu = new PartialPdu(commandId);
            }
        } else {
            if (commandId == SmppConstants.CMD_ID_SUBMIT_SM_RESP) {
                pdu = new SubmitSmResp();
            } else if (commandId == SmppConstants.CMD_ID_DELIVER_SM_RESP) {
                pdu = new DeliverSmResp();
            } else if (commandId == SmppConstants.CMD_ID_DATA_SM_RESP) {
                pdu = new DataSmResp();
            } else if (commandId == SmppConstants.CMD_ID_ENQUIRE_LINK_RESP) {
View Full Code Here

            submit0.setSourceAddress(new Address((byte)0x03, (byte)0x00, "40404"));
            submit0.setDestAddress(new Address((byte)0x01, (byte)0x01, "44555519205"));
            submit0.setShortMessage(textBytes);

            SubmitSmResp submitResp = session0.submit(submit0, 10000);
           
           
            logger.info("sendWindow.size: {}", session0.getSendWindow().getSize());
           
            System.out.println("Press any key to unbind and close sessions");
View Full Code Here

            Assert.assertNotNull(t);
            Assert.assertTrue(t.getMessage(), (t instanceof TerminatingNullByteNotFoundException));

            TerminatingNullByteNotFoundException ex = (TerminatingNullByteNotFoundException)t;
            // unwrap it
            SubmitSmResp pdu0 = (SubmitSmResp)ex.getPartialPdu();
            Assert.assertEquals(17, pdu0.getCommandLength());
            Assert.assertEquals(SmppConstants.CMD_ID_SUBMIT_SM_RESP, pdu0.getCommandId());
            Assert.assertEquals(0, pdu0.getCommandStatus());
            Assert.assertEquals(171192033, pdu0.getSequenceNumber());
            Assert.assertEquals(true, pdu0.isResponse());
            Assert.assertEquals(null, pdu0.getMessageId());

        } finally {
            SmppSessionUtil.close(session);
        }
    }
View Full Code Here

            submit0.setSourceAddress(new Address((byte)0x03, (byte)0x00, "40404"));
            submit0.setDestAddress(new Address((byte)0x01, (byte)0x01, "44555519205"));
            submit0.setShortMessage(textBytes);

            SubmitSmResp submitResp = session0.submit(submit0, 10000);

      logger.info("Got messageId: {}", submitResp.getMessageId());

            System.out.println("Press any key to send query #1");
            System.in.read();

      QuerySm query0 = new QuerySm();
      query0.setMessageId(submitResp.getMessageId());
            query0.setSourceAddress(new Address((byte)0x03, (byte)0x00, "40404"));

      WindowFuture<Integer,PduRequest,PduResponse> future1 = session0.sendRequestPdu(query0, 10000, true);
      while (!future1.isDone()) {}
      QuerySmResp queryResp = (QuerySmResp)future1.getResponse();

            System.out.println("Press any key to send cancel #1");
            System.in.read();

      CancelSm cancel0 = new CancelSm();
      cancel0.setMessageId(submitResp.getMessageId());
            cancel0.setSourceAddress(new Address((byte)0x03, (byte)0x00, "40404"));
            cancel0.setDestAddress(new Address((byte)0x01, (byte)0x01, "44555519205"));
      WindowFuture<Integer,PduRequest,PduResponse> future2 = session0.sendRequestPdu(cancel0, 10000, true);
      while (!future2.isDone()) {}
      CancelSmResp cancelResp = (CancelSmResp)future2.getResponse();
View Full Code Here

            submit0.setSourceAddress(new Address((byte)0x03, (byte)0x00, "40404"));
            submit0.setDestAddress(new Address((byte)0x01, (byte)0x01, "44555519205"));
            submit0.setShortMessage(textBytes);

            SubmitSmResp submitResp = session0.submit(submit0, 10000);
           
           
            logger.info("sendWindow.size: {}", session0.getSendWindow().getSize());
           
            System.out.println("Press any key to unbind and close sessions");
View Full Code Here

TOP

Related Classes of com.cloudhopper.smpp.pdu.SubmitSmResp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.