Package org.jsmpp.session

Examples of org.jsmpp.session.SMPPSession


        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

        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 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(internalSessionStateListener);
        session.connectAndBind(
                this.configuration.getHost(),
                this.configuration.getPort(),
                new BindParameter(
                        BindType.BIND_TX,
                        this.configuration.getSystemId(),
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

        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,
                                  configuration.getAddressRange()));
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

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.