Package com.alibaba.otter.shared.communication.core.impl.rmi

Examples of com.alibaba.otter.shared.communication.core.impl.rmi.RmiCommunicationConnectionFactory


        endpoint.initial();
    }

    @Test
    public void testSingle() {
        CommunicationConnectionFactory factory = new RmiCommunicationConnectionFactory();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(1099);
        CommunicationConnection connection = factory.createConnection(param);
        Object result = connection.call(new HeartEvent());
        want.object(result).notNull();
    }
View Full Code Here


        want.object(result).notNull();
    }

    @Test
    public void testPool() {
        CommunicationConnectionFactory factory = new RmiCommunicationConnectionFactory();
        CommunicationConnectionFactory poolFactory = new CommunicationConnectionPoolFactory(factory);
        ((CommunicationConnectionPoolFactory) poolFactory).initial();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(1099);
View Full Code Here

        }
    }

    @Test
    public void testPool_exhaust() {
        CommunicationConnectionFactory factory = new RmiCommunicationConnectionFactory();
        CommunicationConnectionFactory poolFactory = new CommunicationConnectionPoolFactory(factory);
        ((CommunicationConnectionPoolFactory) poolFactory).initial();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(1099);
View Full Code Here

        RmiCommunicationEndpoint endpoint1098 = new RmiCommunicationEndpoint(1098);
        endpoint1098.setAlwaysCreateRegistry(false);
        endpoint1098.initial();

        CommunicationConnectionPoolFactory factory = new CommunicationConnectionPoolFactory(
                                                                                            new RmiCommunicationConnectionFactory());
        factory.initial();
        client = new DefaultCommunicationClientImpl(factory);
        client.initial();
    }
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.communication.core.impl.rmi.RmiCommunicationConnectionFactory

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.