Package org.jsmpp.bean

Examples of org.jsmpp.bean.SubmitMultiResult


                                      eq(ReplaceIfPresentFlag.DEFAULT),
                                      eq(DataCoding.newInstance(dataCoding)),
                                      eq((byte) 0),
                                      aryEq(body),
                                      aryEq(new OptionalParameter[0])))
            .andReturn(new SubmitMultiResult("1"));
       
        replay(session);
       
        command.execute(exchange);
       
View Full Code Here


                                      eq(ReplaceIfPresentFlag.DEFAULT),
                                      eq(DataCoding.newInstance(binDataCoding)),
                                      eq((byte) 0),
                                      aryEq(body),
                                      aryEq(new OptionalParameter[0])))
            .andReturn(new SubmitMultiResult("1"));
       
        replay(session);
       
        command.execute(exchange);
       
View Full Code Here

                                      eq(ReplaceIfPresentFlag.DEFAULT),
                                      eq(DataCoding.newInstance(latin1DataCoding)),
                                      eq((byte) 0),
                                      aryEq(bodyNarrowed),
                                      aryEq(new OptionalParameter[0])))
            .andReturn(new SubmitMultiResult("1"));
       
        replay(session);
       
        command.execute(exchange);
       
View Full Code Here

        try {
            Address address1 = new Address(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "628176504657");
            Address address2 = new Address(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "628176504658");
            Address[] addresses = new Address[] {address1, address2};
            SubmitMultiResult result = session.submitMultiple("CMT", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "1616",
                                                        addresses, new ESMClass(), (byte)0, (byte)1, timeFormatter.format(new Date()), null,
                                                        new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS), ReplaceIfPresentFlag.REPLACE,
                                                        new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS1, false), (byte)0,
                                                        "jSMPP simplify SMPP on Java platform".getBytes());
            System.out.println("Messages submitted, result is " + result);
View Full Code Here

        if (SMSCDeliveryReceipt.SUCCESS.containedIn(submitMulti.getRegisteredDelivery())
                || SMSCDeliveryReceipt.SUCCESS_FAILURE.containedIn(submitMulti.getRegisteredDelivery())) {
            execServiceDelReciept.execute(new DeliveryReceiptTask(source, submitMulti, messageId));
        }

        return new SubmitMultiResult(messageId.getValue(), new UnsuccessDelivery[0]);
    }
View Full Code Here

                optionalParameters);

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

        return new SubmitMultiResult(resp.getMessageId(), resp
                .getUnsuccessSmes());
    }
View Full Code Here

                optionalParameters);

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

        return new SubmitMultiResult(resp.getMessageId(), resp
                .getUnsuccessSmes());
    }
View Full Code Here

   
    public void processSubmitMulti(Command pduHeader, byte[] pdu,
            ServerResponseHandler responseHandler) throws IOException {
        try {
            SubmitMulti submitMulti = pduDecomposer.submitMulti(pdu);
            SubmitMultiResult result = responseHandler.processSubmitMulti(submitMulti);
            logger.debug("Sending response with message_id " + result.getMessageId() + " for request with sequence_number " + pduHeader.getSequenceNumber());
            responseHandler.sendSubmitMultiResponse(result, pduHeader.getSequenceNumber());
        } catch (PDUStringException e) {
            responseHandler.sendNegativeResponse(pduHeader.getCommandId(), e.getErrorCode(), pduHeader.getSequenceNumber());
        } catch (InvalidNumberOfDestinationsException e) {
            responseHandler.sendNegativeResponse(pduHeader.getCommandId(), SMPPConstant.STAT_ESME_RINVNUMDESTS, pduHeader.getSequenceNumber());
View Full Code Here

        expect(session.submitMultiple(eq("CMT"), eq(TypeOfNumber.UNKNOWN), eq(NumberingPlanIndicator.UNKNOWN), eq("1616"),
                aryEq(new Address[]{new Address(TypeOfNumber.UNKNOWN, NumberingPlanIndicator.UNKNOWN, "1717")}),
                eq(new ESMClass()), eq((byte) 0), eq((byte) 1), (String) isNull(), (String) isNull(), eq(new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS_FAILURE)),
                eq(ReplaceIfPresentFlag.DEFAULT), eq(DataCoding.newInstance((byte) 0)), eq((byte) 0), aryEq("short message body".getBytes()),
                aryEq(new OptionalParameter[0])))
                .andReturn(new SubmitMultiResult("1", new UnsuccessDelivery(new Address(TypeOfNumber.UNKNOWN, NumberingPlanIndicator.UNKNOWN, "1717"), 0)));

        replay(session);

        command.execute(exchange);
View Full Code Here

        expect(session.submitMultiple(eq("CMT"), eq(TypeOfNumber.NATIONAL), eq(NumberingPlanIndicator.NATIONAL), eq("1818"),
                aryEq(new Address[]{new Address(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.INTERNET, "1919")}),
                eq(new ESMClass()), eq((byte) 1), eq((byte) 2), eq("-300101001831100-"), eq("-300101003702200-"), eq(new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS)),
                eq(ReplaceIfPresentFlag.REPLACE), eq(DataCoding.newInstance((byte) 0)), eq((byte) 0), aryEq("short message body".getBytes()),
                aryEq(new OptionalParameter[0])))
                .andReturn(new SubmitMultiResult("1"));

        replay(session);

        command.execute(exchange);
View Full Code Here

TOP

Related Classes of org.jsmpp.bean.SubmitMultiResult

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.