Package com.volantis.mps.session.pool

Examples of com.volantis.mps.session.pool.PoolableSessionFactory


                            throws MessageException {

        try {
            processChannelInfo(channelName, channelInfo);
            final PoolableObjectFactory sessionFactory =
                    new PoolableSessionFactory(SMSCAddress, SMSCPort, SMSCUser,
                            SMSCPassword, SMSCBindType);
            this.sessionPool = initializeSessionPool(channelInfo, sessionFactory);
            this.sessionValidator = initializeSessionValidator(channelInfo);

            BindRequest request = new BindTransmitter();
View Full Code Here


    private MessageListener listener;

    // Javadoc inherited.
    protected void setUp() throws Exception {
        super.setUp();
        sessionFactory = new PoolableSessionFactory(
                ADDRESS, PORT, SMSC_USERNAME, SMSC_PASSWORD, ASYNC_BINDTYPE);
        // Create the mock SMSC and start it listening.
        testSimulator = new TestSimulator(PORT);
        listener = new MessageListener();
        testSimulator.start(listener);
View Full Code Here

     * is communicating synchronously with the SMSC.
     *
     * @throws MessageException if there was a problem running the test
     */
    public void testSendEnquireLinkWhenSynchronous() throws MessageException {
        PoolableSessionFactory sessionFactory = new PoolableSessionFactory(
                ADDRESS, PORT, SMSC_USERNAME, SMSC_PASSWORD, SYNC_BINDTYPE);
        Session session = (Session) sessionFactory.makeObject();
        assertTrue(SessionValidator.sendEnquireLink(session));
    }
View Full Code Here

     * MPS is communicating asynchronously with the SMSC.
     *
     * @throws MessageException if there was a problem running the test
     */
    public void testSendEnquireLinkWhenAsynchronous() throws MessageException {
        PoolableSessionFactory sessionFactory = new PoolableSessionFactory(
                ADDRESS, PORT, SMSC_USERNAME, SMSC_PASSWORD, ASYNC_BINDTYPE);
        Session session = (Session) sessionFactory.makeObject();
        assertFalse(SessionValidator.sendEnquireLink(session));
    }
View Full Code Here

                                              String SMSCPassword,
                                              String SMSCBindType) {
        sessionFactory = new PoolableSessionFactoryMock("sessionFactory",
                expectations, address, port, SMSCUser, SMSCPassword,
                SMSCBindType);
        realSessionFactory = new PoolableSessionFactory(
                address, port, SMSCUser, SMSCPassword, SMSCBindType);
    }
View Full Code Here

        channelInfo.put(LogicaSMSChannelAdapter.BINDTYPE, SYNC_BINDTYPE);
        SessionPoolMock sessionPool =
                new SessionPoolMock("sessionPool", orderedExpectations);
        mockMessage = new MultiChannelMessageMock("mockMessage", orderedExpectations);
        Session badSession = new Session(new TCPIPConnection(ADDRESS, PORT));
        PoolableSessionFactory sessionFactory = new PoolableSessionFactory(
                ADDRESS,  PORT, USERNAME, PASSWORD, SYNC_BINDTYPE);
        Session goodSession = (Session) sessionFactory.makeObject();

        // Set expectations.
        mockMessage.fuzzy.generateTargetMessageAsString(
                mockFactory.expectsInstanceOf(String.class)).
                returns("Test message");
View Full Code Here

     */
    public TestSessionPool(int maxActive,
                           int numActive,
                           int numIdle,
                           boolean testOnBorrow) throws Exception {
        this(new PoolableSessionFactory(ADDRESS, PORT, SMSC_USERNAME,
                SMSC_PASSWORD, SMSC_BINDTYPE),
                maxActive,
                numActive,
                numIdle,
                testOnBorrow);
View Full Code Here

TOP

Related Classes of com.volantis.mps.session.pool.PoolableSessionFactory

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.