Package org.jsmpp.session

Examples of org.jsmpp.session.SMPPSession


        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


        assertSame(optionalParameters, result.getOptionalParameters());
    }
   
    @Test
    public void onAcceptDataSmException() throws Exception {
        SMPPSession session = createMock(SMPPSession.class);
        DataSm dataSm = createMock(DataSm.class);
        Exchange exchange = createMock(Exchange.class);
        Exception exception = new Exception("forced exception for test");
       
        expect(endpoint.createOnAcceptDataSm(dataSm, "1"))
View Full Code Here

        verify(endpoint, processor, exceptionHandler, session, dataSm, exchange);
    }
   
    @Test
    public void onAcceptDataSmProcessRequestException() throws Exception {
        SMPPSession session = createMock(SMPPSession.class);
        DataSm dataSm = createMock(DataSm.class);
        Exchange exchange = createMock(Exchange.class);
        ProcessRequestException exception = new ProcessRequestException("forced exception for test", 100);
       
        expect(endpoint.createOnAcceptDataSm(dataSm, "1"))
View Full Code Here

    }
   
    private SMPPSession createSession() throws IOException {
        LOG.debug("Connecting to: " + getEndpoint().getConnectionString() + "...");
       
        SMPPSession session = createSMPPSession();
        session.setEnquireLinkTimer(this.configuration.getEnquireLinkTimer());
        session.setTransactionTimer(this.configuration.getTransactionTimer());
        session.addSessionStateListener(sessionStateListener);
        session.connectAndBind(
                this.configuration.getHost(),
                this.configuration.getPort(),
                new BindParameter(
                        BindType.BIND_TX,
                        this.configuration.getSystemId(),
View Full Code Here

     *
     * @return the SMPPSession
     */
    SMPPSession createSMPPSession() {
        if (configuration.getUsingSSL()) {
            return new SMPPSession(new SynchronizedPDUSender(new DefaultPDUSender(new DefaultComposer())),
                                   new DefaultPDUReader(), SmppSSLConnectionFactory.getInstance());
        } else {
            return new SMPPSession();
        }
    }
View Full Code Here

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

    private SMPPSession createSession() throws IOException {
        SMPPSession session = createSMPPSession();
        session.setEnquireLinkTimer(configuration.getEnquireLinkTimer());
        session.setTransactionTimer(configuration.getTransactionTimer());
        session.addSessionStateListener(sessionStateListener);
        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

     *
     * @return the SMPPSession
     */
    SMPPSession createSMPPSession() {
        if (configuration.getUsingSSL()) {
            return new SMPPSession(new SynchronizedPDUSender(new DefaultPDUSender(
                    new DefaultComposer())), new DefaultPDUReader(), SmppSSLConnectionFactory
                    .getInstance());
        } else {
            return new SMPPSession();
        }
    }
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

TOP

Related Classes of org.jsmpp.session.SMPPSession

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.