Examples of QuerySmResp


Examples of com.cloudhopper.smpp.pdu.QuerySmResp

            } else if (commandId == SmppConstants.CMD_ID_DATA_SM_RESP) {
                pdu = new DataSmResp();
            } else if (commandId == SmppConstants.CMD_ID_CANCEL_SM_RESP) {
                pdu = new CancelSmResp();
            } else if (commandId == SmppConstants.CMD_ID_QUERY_SM_RESP) {
                pdu = new QuerySmResp();
            } else if (commandId == SmppConstants.CMD_ID_ENQUIRE_LINK_RESP) {
                pdu = new EnquireLinkResp();
            } else if (commandId == SmppConstants.CMD_ID_BIND_TRANSCEIVER_RESP) {
                pdu = new BindTransceiverResp();
            } else if (commandId == SmppConstants.CMD_ID_BIND_RECEIVER_RESP) {
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.QuerySmResp

      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();
View Full Code Here

Examples of com.logica.smpp.pdu.QuerySMResp

    catch (WrongLengthOfStringException exc) {
      myLog.error ("query - failed creating address", exc);
      return SmppMessageStateType.eUnknown;
    }

    QuerySMResp response = null;
    try {
      myLog.debug ("query - calling getSession ().query");
      response = getSession ().query (request);
    }
    catch (ValueNotSetException exc) {
      myLog.error ("query - value not set", exc);
      return SmppMessageStateType.eUnknown;
    }
    catch (WrongSessionStateException exc) {
      myLog.error ("query - session state wrong", exc);
      return SmppMessageStateType.eUnknown;
    }
    catch (TimeoutException exc) {
      myLog.error ("query - timeout establishing connection", exc);
      return SmppMessageStateType.eUnknown;
    }
    catch (PDUException exc) {
      myLog.error ("query - exception in pdu", exc);
      return SmppMessageStateType.eUnknown;
    }
    catch (IOException exc) {
      myLog.error ("query - io exception (socket problem?)", exc);
      return SmppMessageStateType.eUnknown;
    }

    if (response == null) {
      return SmppMessageStateType.eUnknown;
    }
    else {
      myLog.debug ("query - received response: {}", response.debugString ());
      return SmppMessageStateType.decode (response.getMessageState ());
    }
  }
View Full Code Here

Examples of com.logica.smpp.pdu.QuerySMResp

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

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

Examples of ie.omk.smpp.message.QuerySMResp

        case SMPPPacket.QUERY_SM:
            response = new QuerySM();
            break;

        case SMPPPacket.QUERY_SM_RESP:
            response = new QuerySMResp();
            break;

        case SMPPPacket.QUERY_LAST_MSGS:
            response = new QueryLastMsgs();
            break;
View Full Code Here

Examples of org.jsmpp.bean.QuerySmResp

        ensureTransmittable("queryShortMessage");
       
        QuerySmCommandTask task = new QuerySmCommandTask(pduSender(),
                messageId, sourceAddrTon, sourceAddrNpi, sourceAddr);
       
        QuerySmResp resp = (QuerySmResp)executeSendCommand(task,
                getTransactionTimer());

        if (resp.getMessageId().equals(messageId)) {
            return new QuerySmResult(resp.getFinalDate(), resp
                    .getMessageState(), resp.getErrorCode());
        } else {
            // message id requested not same as the returned
            throw new InvalidResponseException(
                    "Requested message_id doesn't match with the result");
        }
View Full Code Here

Examples of org.jsmpp.bean.QuerySmResp

            InvalidResponseException, NegativeResponseException, IOException {

        QuerySmCommandTask task = new QuerySmCommandTask(pduSender(),
                messageId, sourceAddrTon, sourceAddrNpi, sourceAddr);

        QuerySmResp resp = (QuerySmResp)executeSendCommand(task,
                getTransactionTimer());

        if (resp.getMessageId().equals(messageId)) {
            return new QuerySmResult(resp.getFinalDate(), resp
                    .getMessageState(), resp.getErrorCode());
        } else {
            // message id requested not same as the returned
            throw new InvalidResponseException(
                    "Requested message_id doesn't match with the result");
        }
View Full Code Here

Examples of org.jsmpp.bean.QuerySmResp

            InvalidResponseException, NegativeResponseException, IOException {

        QuerySmCommandTask task = new QuerySmCommandTask(pduSender(),
                messageId, sourceAddrTon, sourceAddrNpi, sourceAddr);

        QuerySmResp resp = (QuerySmResp)executeSendCommand(task,
                getTransactionTimer());

        if (resp.getMessageId().equals(messageId)) {
            return new QuerySmResult(resp.getFinalDate(), resp
                    .getMessageState(), resp.getErrorCode());
        } else {
            // message id requested not same as the returned
            throw new InvalidResponseException(
                    "Requested message_id doesn't match with the result");
        }
View Full Code Here

Examples of org.jsmpp.bean.QuerySmResp

        PendingResponse<Command> pendingResp = responseHandler
                .removeSentItem(pduHeader.getSequenceNumber());
        if (pendingResp != null) {
            try {
                QuerySmResp resp = pduDecomposer.querySmResp(pdu);
                pendingResp.done(resp);
            } catch (PDUStringException e) {
                logger.error("Failed decomposing submit_sm_resp", e);
                responseHandler.sendGenerickNack(e.getErrorCode(), pduHeader
                        .getSequenceNumber());
View Full Code Here

Examples of org.jsmpp.bean.QuerySmResp

        ensureTransmittable("queryShortMessage");
       
        QuerySmCommandTask task = new QuerySmCommandTask(pduSender(),
                messageId, sourceAddrTon, sourceAddrNpi, sourceAddr);
       
        QuerySmResp resp = (QuerySmResp)executeSendCommand(task,
                getTransactionTimer());

        if (resp.getMessageId().equals(messageId)) {
            return new QuerySmResult(resp.getFinalDate(), resp
                    .getMessageState(), resp.getErrorCode());
        } else {
            // message id requested not same as the returned
            throw new InvalidResponseException(
                    "Requested message_id doesn't match with the result");
        }
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.