Package org.smpp.pdu

Examples of org.smpp.pdu.DeliverSM


          proc = (SimulatorPDUProcessor) processors.get(i);
          if (proc.getSystemId().equals(client)) {
            if (proc.isActive()) {
              System.out.print("Type the message> ");
              String message = keyboard.readLine();
              DeliverSM request = new DeliverSM();
              try {
                request.setShortMessage(message);
                proc.serverRequest(request);
                System.out.println("Message sent.");
              } catch (WrongLengthOfStringException e) {
                System.out.println("Message sending failed");
                event.write(e, "");
View Full Code Here


  }

  private void deliver(DeliveryInfoEntry entry) {
    debug.enter(this, "deliver");
    SubmitSM submit = entry.submit;
    DeliverSM deliver = new DeliverSM();
    deliver.setSourceAddr(submit.getDestAddr());
    deliver.setDestAddr(submit.getDestAddr());
    String msg = "";
    msg += "id:" + entry.messageId + " ";
    msg += "sub:" + entry.sub + " ";
    msg += "dlvrd:" + entry.dlvrd + " ";
    msg += "submit date:" + formatDate(entry.submitted) + " ";
    msg += "done date:" + formatDate(System.currentTimeMillis()) + " ";
    msg += "stat:" + entry.stat + " ";
    msg += "err:" + entry.err + " ";
    String shortMessage = submit.getShortMessage();
    int msgLen = shortMessage.length();
    msg += "text:" + shortMessage.substring(0, (msgLen > 20 ? 20 : msgLen));
    try {
      deliver.setShortMessage(msg);
      deliver.setServiceType(submit.getServiceType());
    } catch (WrongLengthOfStringException e) {
    }
    try {
      entry.processor.serverRequest(deliver);
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.smpp.pdu.DeliverSM

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.