Package com.cloudhopper.smpp.simulator

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorPduProcessor


        // bind and get the simulator session
        DefaultSmppSession session = (DefaultSmppSession)bootstrap.bind(configuration);
        SmppSimulatorSessionHandler simulator0 = server.pollNextSession(1000);
        // register a generic nack will come next
        simulator0.setPduProcessor(new SmppSimulatorPduProcessor() {
            @Override
            public boolean process(SmppSimulatorSessionHandler session, Channel channel, Pdu pdu) throws Exception {
                session.addPduToWriteOnNextPduReceived(((PduRequest)pdu).createGenericNack(SmppConstants.STATUS_SYSERR));
                return true;
            }
View Full Code Here


        // bind and get the simulator session
        DefaultSmppSession session = (DefaultSmppSession)bootstrap.bind(configuration);
        SmppSimulatorSessionHandler simulator0 = server.pollNextSession(1000);
        // create an enquire link response back -- we should skip it and wait for a response instead
        simulator0.setPduProcessor(new SmppSimulatorPduProcessor() {
            @Override
            public boolean process(SmppSimulatorSessionHandler session, Channel channel, Pdu pdu) throws Exception {
                EnquireLink enquireLink = new EnquireLink();
                enquireLink.setSequenceNumber(pdu.getSequenceNumber());
                session.addPduToWriteOnNextPduReceived(enquireLink);
View Full Code Here

        // bind and get the simulator session
        DefaultSmppSession session = (DefaultSmppSession)bootstrap.bind(configuration);
        SmppSimulatorSessionHandler simulator0 = server.pollNextSession(1000);
        // create an enquire link response back -- we should skip it and wait for a response instead
        simulator0.setPduProcessor(new SmppSimulatorPduProcessor() {
            @Override
            public boolean process(SmppSimulatorSessionHandler session, Channel channel, Pdu pdu) throws Exception {
                session.addPduToWriteOnNextPduReceived(((PduRequest)pdu).createResponse());
                return true;
            }
View Full Code Here

        // bind and get the simulator session
        PollableSmppSessionHandler sessionHandler = new PollableSmppSessionHandler();
        DefaultSmppSession session = (DefaultSmppSession)bootstrap.bind(configuration, sessionHandler);

        SmppSimulatorSessionHandler simulator0 = server.pollNextSession(1000);
        simulator0.setPduProcessor(new SmppSimulatorPduProcessor() {
            @Override
            public boolean process(SmppSimulatorSessionHandler session, Channel channel, Pdu pdu) throws Exception {
                session.addPduToWriteOnNextPduReceived(((PduRequest)pdu).createResponse());
                return true;
            }
View Full Code Here

        // bind and get the simulator session
        PollableSmppSessionHandler sessionHandler = new PollableSmppSessionHandler();
        DefaultSmppSession session = (DefaultSmppSession)bootstrap.bind(configuration, sessionHandler);

        SmppSimulatorSessionHandler simulator0 = server.pollNextSession(1000);
        simulator0.setPduProcessor(new SmppSimulatorPduProcessor() {
            public boolean process(SmppSimulatorSessionHandler session, Channel channel, Pdu pdu) throws Exception {
                // close the channel
                channel.close().await(1000);
                return true;
            }
View Full Code Here

TOP

Related Classes of com.cloudhopper.smpp.simulator.SmppSimulatorPduProcessor

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.