Package org.jsmpp.util

Examples of org.jsmpp.util.MessageId


            logger.error("IO error occured", e);
        }
    }

    public MessageId onAcceptSubmitSm(SubmitSm submitSm, SMPPServerSession smppServerSession) throws ProcessRequestException {
        MessageId messageId = messageIDGenerator.newMessageId();
        notifier.notifyObservers(submitSm);
        return messageId;
    }
View Full Code Here


            logger.error("IO error occured", e);
        }
    }

    public MessageId onAcceptSubmitSm(SubmitSm submitSm, SMPPServerSession smppServerSession) throws ProcessRequestException {
        MessageId messageId = messageIDGenerator.newMessageId();
        notifier.notifyObservers(submitSm);
        return messageId;
    }
View Full Code Here

    }

    public DataSmResult onAcceptDataSm(DataSm dataSm, Session session) throws ProcessRequestException {
        LOG.debug("Received a dataSm {}", dataSm);

        MessageId newMessageId = messageIDGenerator.newMessageId();
        Exchange exchange = endpoint.createOnAcceptDataSm(dataSm, newMessageId.getValue());
        try {
            processor.process(exchange);
        } catch (Exception e) {
            exchange.setException(e);
        }
View Full Code Here

       
        listener = new MessageReceiverListenerImpl(endpoint, processor, exceptionHandler);
        listener.setMessageIDGenerator(new MessageIDGenerator() {
            public MessageId newMessageId() {
                try {
                    return new MessageId("1");
                } catch (PDUStringException e) {
                    throw new RuntimeException(e);
                }
            }
        });
View Full Code Here

        Exchange exchange = new DefaultExchange(new DefaultCamelContext(), ExchangePattern.InOut);
        exchange.getIn().setHeader(SmppConstants.COMMAND, "DataSm");
        expect(session.dataShortMessage(eq("CMT"), eq(TypeOfNumber.UNKNOWN), eq(NumberingPlanIndicator.UNKNOWN), eq("1616"),
                eq(TypeOfNumber.UNKNOWN), eq(NumberingPlanIndicator.UNKNOWN), eq("1717"), eq(new ESMClass()),
                eq(new RegisteredDelivery((byte) 1)), eq(DataCoding.newInstance((byte) 0))))
            .andReturn(new DataSmResult(new MessageId("1"), null));

        replay(session);

        command.execute(exchange);
View Full Code Here

        exchange.getIn().setHeader(SmppConstants.DEST_ADDR, "1919");
        exchange.getIn().setHeader(SmppConstants.REGISTERED_DELIVERY, new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS).value());
        expect(session.dataShortMessage(eq("XXX"), eq(TypeOfNumber.NATIONAL), eq(NumberingPlanIndicator.NATIONAL), eq("1818"),
                eq(TypeOfNumber.INTERNATIONAL), eq(NumberingPlanIndicator.INTERNET), eq("1919"), eq(new ESMClass()),
                eq(new RegisteredDelivery((byte) 2)), eq(DataCoding.newInstance((byte) 0))))
            .andReturn(new DataSmResult(new MessageId("1"), null));

        replay(session);

        command.execute(exchange);
View Full Code Here

                eq(new OptionalParameter.COctetString(Tag.ADDITIONAL_STATUS_INFO_TEXT.code(), "urgent")),
                eq(new OptionalParameter.Byte(Tag.DEST_ADDR_SUBUNIT, (byte) 4)),
                eq(new OptionalParameter.Short(Tag.DEST_TELEMATICS_ID.code(), (short) 2)),
                eq(new OptionalParameter.Int(Tag.QOS_TIME_TO_LIVE, 3600000)),
                eq(new OptionalParameter.Null(Tag.ALERT_ON_MESSAGE_DELIVERY))))
            .andReturn(new DataSmResult(new MessageId("1"), new OptionalParameter[]{
                new OptionalParameter.OctetString(Tag.SOURCE_SUBADDRESS, "1292"), new OptionalParameter.COctetString(Tag.ADDITIONAL_STATUS_INFO_TEXT.code(), "urgent"),
                new OptionalParameter.Byte(Tag.DEST_ADDR_SUBUNIT, (byte) 4), new OptionalParameter.Short(Tag.DEST_TELEMATICS_ID.code(), (short) 2),
                new OptionalParameter.Int(Tag.QOS_TIME_TO_LIVE, 3600000), new OptionalParameter.Null(Tag.ALERT_ON_MESSAGE_DELIVERY)}));

        replay(session);
View Full Code Here

                eq(new OptionalParameter.COctetString((short) 0x2151, "0816")),
                eq(new OptionalParameter.Byte((short) 0x2152, (byte) 6)),
                eq(new OptionalParameter.Short((short) 0x2153, (short) 9)),
                eq(new OptionalParameter.Int((short) 0x2154, 7400000)),
                eq(new OptionalParameter.Null((short) 0x2155))))
            .andReturn(new DataSmResult(new MessageId("1"), new OptionalParameter[]{
                new OptionalParameter.OctetString(Tag.SOURCE_SUBADDRESS, "1292"), new OptionalParameter.COctetString(Tag.ADDITIONAL_STATUS_INFO_TEXT.code(), "urgent"),
                new OptionalParameter.Byte(Tag.DEST_ADDR_SUBUNIT, (byte) 4), new OptionalParameter.Short(Tag.DEST_TELEMATICS_ID.code(), (short) 2),
                new OptionalParameter.Int(Tag.QOS_TIME_TO_LIVE, 3600000), new OptionalParameter.Null(Tag.ALERT_ON_MESSAGE_DELIVERY)}));

        replay(session);
View Full Code Here

    }

    public DataSmResult onAcceptDataSm(DataSm dataSm, Session session) throws ProcessRequestException {
        LOG.debug("Received a dataSm {}", dataSm);

        MessageId newMessageId = messageIDGenerator.newMessageId();

        try {
            Exchange exchange = endpoint.createOnAcceptDataSm(dataSm, newMessageId.getValue());

            LOG.trace("processing the new smpp exchange...");
            processor.process(exchange);
            LOG.trace("processed the new smpp exchange");
        } catch (Exception e) {
View Full Code Here

       
        listener = new MessageReceiverListenerImpl(endpoint, processor, exceptionHandler);
        listener.setMessageIDGenerator(new MessageIDGenerator() {
            public MessageId newMessageId() {
                try {
                    return new MessageId("1");
                } catch (PDUStringException e) {
                    throw new RuntimeException(e);
                }
            }
        });
View Full Code Here

TOP

Related Classes of org.jsmpp.util.MessageId

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.