Examples of EnquireLinkResp


Examples of com.cloudhopper.smpp.pdu.EnquireLinkResp

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

            // demo of a "synchronous" enquireLink call - send it and wait for a response
            EnquireLinkResp enquireLinkResp1 = session0.enquireLink(new EnquireLink(), 10000);
            logger.info("enquire_link_resp #1: commandStatus [" + enquireLinkResp1.getCommandStatus() + "=" + enquireLinkResp1.getResultMessage() + "]");
           
            System.out.println("Press any key to send enquireLink #2");
            System.in.read();

            // demo of an "asynchronous" enquireLink call - send it, get a future,
            // and then optionally choose to pick when we wait for it
            WindowFuture<Integer,PduRequest,PduResponse> future0 = session0.sendRequestPdu(new EnquireLink(), 10000, true);
            if (!future0.await()) {
                logger.error("Failed to receive enquire_link_resp within specified time");
            } else if (future0.isSuccess()) {
                EnquireLinkResp enquireLinkResp2 = (EnquireLinkResp)future0.getResponse();
                logger.info("enquire_link_resp #2: commandStatus [" + enquireLinkResp2.getCommandStatus() + "=" + enquireLinkResp2.getResultMessage() + "]");
            } else {
                logger.error("Failed to properly receive enquire_link_resp: " + future0.getCause());
            }

            System.out.println("Press any key to send submit #1");
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.EnquireLinkResp

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

            // demo of a "synchronous" enquireLink call - send it and wait for a response
            EnquireLinkResp enquireLinkResp1 = session0.enquireLink(new EnquireLink(), 10000);
            logger.info("enquire_link_resp #1: commandStatus [" + enquireLinkResp1.getCommandStatus() + "=" + enquireLinkResp1.getResultMessage() + "]");
           
            System.out.println("Press any key to send enquireLink #2");
            System.in.read();

            // demo of an "asynchronous" enquireLink call - send it, get a future,
            // and then optionally choose to pick when we wait for it
            WindowFuture<Integer,PduRequest,PduResponse> future0 = session0.sendRequestPdu(new EnquireLink(), 10000, true);
            if (!future0.await()) {
                logger.error("Failed to receive enquire_link_resp within specified time");
            } else if (future0.isSuccess()) {
                EnquireLinkResp enquireLinkResp2 = (EnquireLinkResp)future0.getResponse();
                logger.info("enquire_link_resp #2: commandStatus [" + enquireLinkResp2.getCommandStatus() + "=" + enquireLinkResp2.getResultMessage() + "]");
            } else {
                logger.error("Failed to properly receive enquire_link_resp: " + future0.getCause());
            }

            System.out.println("Press any key to send submit #1");
View Full Code Here

Examples of com.logica.smpp.pdu.EnquireLinkResp

  public boolean isOpen ()
  {
    EnquireLink request = new EnquireLink ();

    try {
      EnquireLinkResp response = getSession ().enquireLink (request);
      return response != null;
    }
    catch (ValueNotSetException exc) {
      myLog.error ("isOpen - value not set", exc);
      return false;
View Full Code Here

Examples of com.logica.smpp.pdu.EnquireLinkResp

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

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

Examples of com.logica.smpp.pdu.EnquireLinkResp

               }
             } else {
               if(safeStop == false) {
                 try {
                   logger.debug("send enq lnk");
                   EnquireLinkResp response =
                              this.session.enquireLink();
                   logger.trace("sent enq lnk");
                       if(response.getCommandStatus() != Data.ESME_ROK) {
                         logger.fatal("error on sending enquire link " +
                             response.getCommandStatus());
                         unbind();
                         working = false;
                      }
                 } catch(IOException e) {
                         logger.fatal(e.toString()+
View Full Code Here

Examples of com.logica.smpp.pdu.EnquireLinkResp

            synchronousSubmitSent = false;
          }
        } else {
          if(safeStop == false) {
                      logger.debug("send enq lnk");
                      EnquireLinkResp response = null;
            try {
              response = this.session.enquireLink();
              logger.trace("sent enq lnk");
                        if(response.getCommandStatus() != Data.ESME_ROK) {
                          safeUnbind();
                            working = false;
                        }              
            } catch (Exception e) {
              logger.error("error on enquire link " +
View Full Code Here

Examples of com.logica.smpp.pdu.EnquireLinkResp

                    working = false;                   
          }
        } else {
          if(safeStop == false) {
                      logger.debug("send enq lnk");
                      EnquireLinkResp response = null;
            try {
              response = this.session.enquireLink();
              logger.trace("sent enq lnk");
                        if(response.getCommandStatus() != Data.ESME_ROK) {
                          logger.error("error on enquire link no OK, unbind");
                          unbind();
                            working = false;
                        }              
            } catch (Exception e) {
View Full Code Here

Examples of ie.omk.smpp.message.EnquireLinkResp

     * @throws java.io.IOException
     *             If an I/O error occurs while writing to the network
     *             connection.
     */
    public void ackEnquireLink(EnquireLink rq) throws java.io.IOException {
        EnquireLinkResp resp = new EnquireLinkResp(rq);
        sendResponse(resp);
        LOGGER.info("enquire_link_resp sent.");
    }
View Full Code Here

Examples of ie.omk.smpp.message.EnquireLinkResp

     * @throws java.io.IOException
     *             If an I/O error occurs while writing to the network
     *             connection.
     */
    public void ackEnquireLink(EnquireLink rq) throws java.io.IOException {
        EnquireLinkResp resp = new EnquireLinkResp(rq);
        sendResponse(resp);
        LOGGER.info("enquire_link_resp sent.");
    }
View Full Code Here

Examples of ie.omk.smpp.message.EnquireLinkResp

        case SMPPPacket.ENQUIRE_LINK:
            response = new EnquireLink();
            break;

        case SMPPPacket.ENQUIRE_LINK_RESP:
            response = new EnquireLinkResp();
            break;

        case SMPPPacket.PARAM_RETRIEVE:
            response = new ParamRetrieve();
            break;
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.