Examples of submitShortMessage()


Examples of org.jsmpp.session.SMPPSession.submitShortMessage()

       
        // 5. UTF-16BE is equals to UCS2
        byte[] data = house.getBytes("UTF-16BE");
       
        // 6. Submit the short message
        String messageId = session.submitShortMessage("CMT",
                TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN,
                "1616", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN,
                "628176504657", new ESMClass(), (byte)0, (byte)1
                timeFormatter.format(new Date()), null,
                new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT), (byte)0,
View Full Code Here

Examples of org.jsmpp.session.SMPPSession.submitShortMessage()

        for (int i = 0; i < maxMessage; i++) {
           
            execService.execute(new Runnable() {
                public void run() {
                    try {
                        String messageId = session.submitShortMessage("CMT", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "1616", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "628176504657", new ESMClass(), (byte)0, (byte)1,  timeFormatter.format(new Date()), null, registeredDelivery, (byte)0, DataCodings.ZERO, (byte)0, "jSMPP simplify SMPP on Java platform".getBytes());
                        System.out.println("Message submitted, message_id is " + messageId);
                    } catch (PDUException e) {
                        System.err.println("Invalid PDU parameter");
                        e.printStackTrace();
                        counter.incrementAndGet();
View Full Code Here

Examples of org.jsmpp.session.SMPPSession.submitShortMessage()

        try {
            // set RegisteredDelivery
            final RegisteredDelivery registeredDelivery = new RegisteredDelivery();
            registeredDelivery.setSMSCDeliveryReceipt(SMSCDeliveryReceipt.SUCCESS_FAILURE);

            String messageId = session.submitShortMessage("CMT", TypeOfNumber.INTERNATIONAL,
                    NumberingPlanIndicator.UNKNOWN, "1616", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN,
                    "628176504657", new ESMClass(), (byte)0, (byte)1, timeFormatter.format(new Date()), null,
                    registeredDelivery, (byte)0, new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS1,
                            false), (byte)0, message.getBytes());
View Full Code Here

Examples of org.jsmpp.session.SMPPSession.submitShortMessage()

            System.err.println("Failed connect and bind to host");
            e.printStackTrace();
        }
       
        try {
            String messageId = session.submitShortMessage("CMT", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "1616", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "628176504657", new ESMClass(), (byte)0, (byte)1,  timeFormatter.format(new Date()), null, new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS_FAILURE), (byte)0, DataCodings.ZERO, (byte)0, "jSMPP simplify SMPP on Java platform".getBytes());
           
            /*
             * you can save the submitted message to database.
             */
           
View Full Code Here

Examples of org.jsmpp.session.SMPPSession.submitShortMessage()

            System.err.println("Failed connect and bind to host");
            e.printStackTrace();
        }
       
        try {
            String messageId = session.submitShortMessage("CMT", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "1616", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "628176504657", new ESMClass(), (byte)0, (byte)1,  timeFormatter.format(new Date()), null, new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT), (byte)0, new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS1, false), (byte)0, "jSMPP simplify SMPP on Java platform".getBytes());
            System.out.println("Message submitted, message_id is " + messageId);
        } catch (PDUException e) {
            // Invalid PDU parameter
            System.err.println("Invalid PDU parameter");
            e.printStackTrace();
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.