Examples of SubmitSMResp


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

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_ENQUIRE_LINK_RESP) {
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.SubmitSmResp

            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

Examples of com.cloudhopper.smpp.pdu.SubmitSmResp

            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

Examples of com.cloudhopper.smpp.pdu.SubmitSmResp

            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

Examples of com.cloudhopper.smpp.pdu.SubmitSmResp

            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

Examples of com.logica.smpp.pdu.SubmitSMResp

    SubmitSM request = createSubmit (senderAddress, recipientAddress, message, priority);

    // submit the request
    myLog.debug ("send - submitting request: {}", request.debugString ());
    try {
      SubmitSMResp response = getSession ().submit (request);
      if (response != null) {
        myLog.debug ("send - response.getCommandStatus () = {}", response.getCommandStatus ());
        return response.getMessageId ();
      }
      else {
        return null;
      }
    }
View Full Code Here

Examples of com.logica.smpp.pdu.SubmitSMResp

   * @param event The {@link com.logica.smpp.ServerPDUEvent} should contain
   *               a {@link com.logica.smpp.pdu.SubmitSMResp} PDU.
   */
  protected void handleSubmitResponseEvent (ServerPDUEvent event)
  {
    SubmitSMResp pdu = (SubmitSMResp)(event.getPDU ());
    myLog.debug ("handleSubmitResponseEvent - async request: {}", pdu.debugString ());

    synchronized (mySubmitResponseEvents) {
      mySubmitResponseEvents.enqueue (event);
      mySubmitResponseEvents.notify ();
    }
View Full Code Here

Examples of com.logica.smpp.pdu.SubmitSMResp

 
   
    private boolean sendSubmitSM(BaseMTInfo info) {
      boolean ret = false;
      if(this.bind == true && this.session != null) {
        SubmitSMResp response = null;
        SubmitSM request = info.getRequest();
       
        try {
          logger.info("MT to send for src: " +
                request.getSourceAddr().getAddress() +
            " dstn: " + request.getDestAddr().getAddress() +
            " seqNum: " + request.getSequenceNumber());
          long start = System.currentTimeMillis();
        response = this.session.submit(request);
        if(response != null) {
          long stop = System.currentTimeMillis();
          info.setTransactionTime(stop - start);
          logger.info("MT response " + response.debugString() +
          " for src: " + request.getSourceAddr().getAddress() +
          " dstn: " + request.getDestAddr().getAddress() +
          " seqNum: " + request.getSequenceNumber());
          callMTListeners(info, response);
          ret = true;
View Full Code Here

Examples of ie.omk.smpp.message.SubmitSMResp

    SubmitSM submitSM = (SubmitSM) connection.newInstance(SMPPPacket.SUBMIT_SM);
    submitSM.setDestination(new Address(0, 0, "573001111111"));
    submitSM.setSource(new Address(0, 0, "3542"));
    submitSM.setMessageText("This is a test");

    SubmitSMResp response = (SubmitSMResp) connection.sendRequest(submitSM);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.getMessageId() != null);

    Assert.assertEquals(messageProducer.messageCount(), 1);
    Message message = messageProducer.getMessage(0);
    Assert.assertNotNull(message);
    Assert.assertEquals(message.getProperty("to", String.class), "573001111111");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.