Package org.jsmpp.session

Examples of org.jsmpp.session.SMPPSession$BoundSessionStateListener


        LOG.info("Connected to: " + getEndpoint().getConnectionString());
    }

    private SMPPSession createSession() throws IOException {
        SMPPSession session = createSMPPSession();
        session.setEnquireLinkTimer(configuration.getEnquireLinkTimer());
        session.setTransactionTimer(configuration.getTransactionTimer());
        session.addSessionStateListener(internalSessionStateListener);
        session.setMessageReceiverListener(messageReceiverListener);
        session.connectAndBind(this.configuration.getHost(), this.configuration.getPort(),
                new BindParameter(BindType.BIND_RX, this.configuration.getSystemId(),
                        this.configuration.getPassword(), this.configuration.getSystemType(),
                        TypeOfNumber.UNKNOWN, NumberingPlanIndicator.UNKNOWN, ""));
       
        return session;
View Full Code Here


     * Factory method to easily instantiate a mock SMPPSession
     *
     * @return the SMPPSession
     */
    SMPPSession createSMPPSession() {
        return new SMPPSession(new SynchronizedPDUSender(new DefaultPDUSender(
                    new DefaultComposer())), new DefaultPDUReader(), SmppConnectionFactory
                    .getInstance(configuration));
    }
View Full Code Here

        verify(endpoint, processor, exceptionHandler, deliverSm, exchange);
    }
   
    @Test
    public void onAcceptDataSmSuccess() throws Exception {
        SMPPSession session = createMock(SMPPSession.class);
        DataSm dataSm = createMock(DataSm.class);
        Exchange exchange = createMock(Exchange.class);
        OptionalParameter[] optionalParameters = new OptionalParameter[]{};
       
        expect(endpoint.createOnAcceptDataSm(dataSm, "1"))
View Full Code Here

    private SmppConfiguration config = new SmppConfiguration();
    private AbstractSmppCommand command;
   
    @Before
    public void setUp() {
        session = new SMPPSession();
        config = new SmppConfiguration();
       
        command = new AbstractSmppCommand(session, config) {
            @Override
            public void execute(Exchange exchange) throws SmppException {
View Full Code Here

        assertSame(configuration, binding.getConfiguration());
    }
   
    @Test
    public void createSmppSubmitSmCommand() {
        SMPPSession session = new SMPPSession();
        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
       
        SmppCommand command = binding.createSmppCommand(session, exchange);
       
        assertTrue(command instanceof SmppSubmitSmCommand);
View Full Code Here

        assertTrue(command instanceof SmppSubmitSmCommand);
    }
   
    @Test
    public void createSmppSubmitMultiCommand() {
        SMPPSession session = new SMPPSession();
        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
        exchange.getIn().setHeader(SmppConstants.COMMAND, "SubmitMulti");
       
        SmppCommand command = binding.createSmppCommand(session, exchange);
       
View Full Code Here

        assertTrue(command instanceof SmppSubmitMultiCommand);
    }
   
    @Test
    public void createSmppDataSmCommand() {
        SMPPSession session = new SMPPSession();
        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
        exchange.getIn().setHeader(SmppConstants.COMMAND, "DataSm");
       
        SmppCommand command = binding.createSmppCommand(session, exchange);
       
View Full Code Here

        assertTrue(command instanceof SmppDataSmCommand);
    }
   
    @Test
    public void createSmppReplaceSmCommand() {
        SMPPSession session = new SMPPSession();
        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
        exchange.getIn().setHeader(SmppConstants.COMMAND, "ReplaceSm");
       
        SmppCommand command = binding.createSmppCommand(session, exchange);
       
View Full Code Here

        assertTrue(command instanceof SmppReplaceSmCommand);
    }
   
    @Test
    public void createSmppQuerySmCommand() {
        SMPPSession session = new SMPPSession();
        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
        exchange.getIn().setHeader(SmppConstants.COMMAND, "QuerySm");
       
        SmppCommand command = binding.createSmppCommand(session, exchange);
       
View Full Code Here

        assertTrue(command instanceof SmppQuerySmCommand);
    }
   
    @Test
    public void createSmppCancelSmCommand() {
        SMPPSession session = new SMPPSession();
        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
        exchange.getIn().setHeader(SmppConstants.COMMAND, "CancelSm");
       
        SmppCommand command = binding.createSmppCommand(session, exchange);
       
View Full Code Here

TOP

Related Classes of org.jsmpp.session.SMPPSession$BoundSessionStateListener

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.