Examples of SMPPSession


Examples of org.jsmpp.session.SMPPSession

    }

    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

Examples of org.jsmpp.session.SMPPSession

     * 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

Examples of org.jsmpp.session.SMPPSession

        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

Examples of org.jsmpp.session.SMPPSession

     * 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

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

Examples of org.jsmpp.session.SMPPSession

    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

Examples of org.jsmpp.session.SMPPSession

        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

Examples of org.jsmpp.session.SMPPSession

        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

Examples of org.jsmpp.session.SMPPSession

        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

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
TOP
Copyright © 2018 www.massapi.com. 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.