Package com.logica.smpp.pdu

Examples of com.logica.smpp.pdu.Request


    response.setSequenceNumber(deliverSM.getSequenceNumber());
    return response;
 
   
  public static Request getPDUFromHexDump(String hexDump) {
    Request request = null;
   
    try {
      ByteBuffer bb = new ByteBuffer();
      int count = hexDump.length() / 2;
      boolean isSubmit = false;
      for (int i = 0; i < count; i++) {
        String digit = hexDump.substring(i*2, (i*2)+2).trim();
        byte b = Utilities.strToHex(digit);
        if(i == 7) {
          if(b == 0x5) {
            isSubmit = false;
          } else {
            isSubmit = true;
          }
        }
        bb.appendByte(b);
      }
     
      if(isSubmit == true) {
        request = new SubmitSM();
        request.setData(bb);
      } else {
        request = new DeliverSM();
        request.setData(bb);
      }
    } catch (Exception e) {
      logger.error("getPDUFromHexDump unexpected exception " +
          e.getMessage());
      request = null;
View Full Code Here

TOP

Related Classes of com.logica.smpp.pdu.Request

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.