Search in sources :

Example 1 with DubboCommunicationEndpoint

use of com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint in project otter by alibaba.

the class DubboConnectionTest method initial.

@BeforeClass
public void initial() {
    // 创建endpoint
    DubboCommunicationEndpoint endpoint = new DubboCommunicationEndpoint(2088);
    endpoint.initial();
}
Also used : DubboCommunicationEndpoint(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with DubboCommunicationEndpoint

use of com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint in project otter by alibaba.

the class NodeCommunicationEndpoint method afterPropertiesSet.

public void afterPropertiesSet() throws Exception {
    // String ip = config.currentNode().getIp();
    Long port = configClientService.currentNode().getPort();
    if (endpoint instanceof RmiCommunicationEndpoint) {
        RmiCommunicationEndpoint rmiEndpoint = (RmiCommunicationEndpoint) endpoint;
        // rmiEndpoint.setHost(ip);
        rmiEndpoint.setPort(port.intValue());
    }
    if (endpoint instanceof DubboCommunicationEndpoint) {
        DubboCommunicationEndpoint dubboEndpoint = (DubboCommunicationEndpoint) endpoint;
        dubboEndpoint.setPort(port.intValue());
    }
    endpoint.initial();
}
Also used : RmiCommunicationEndpoint(com.alibaba.otter.shared.communication.core.impl.rmi.RmiCommunicationEndpoint) DubboCommunicationEndpoint(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint)

Example 3 with DubboCommunicationEndpoint

use of com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint in project otter by alibaba.

the class DubboCommunicationTest method initial.

@BeforeClass
public void initial() {
    DubboCommunicationEndpoint endpoint2088 = new DubboCommunicationEndpoint(2088);
    endpoint2088.initial();
    DubboCommunicationEndpoint endpoint2089 = new DubboCommunicationEndpoint(2089);
    endpoint2089.initial();
    CommunicationConnectionFactory factory = new DubboCommunicationConnectionFactory();
    client = new DefaultCommunicationClientImpl(factory);
    client.initial();
}
Also used : DubboCommunicationConnectionFactory(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory) DubboCommunicationEndpoint(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint) DefaultCommunicationClientImpl(com.alibaba.otter.shared.communication.core.impl.DefaultCommunicationClientImpl) CommunicationConnectionFactory(com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionFactory) DubboCommunicationConnectionFactory(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

DubboCommunicationEndpoint (com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationEndpoint)3 BeforeClass (org.testng.annotations.BeforeClass)2 DefaultCommunicationClientImpl (com.alibaba.otter.shared.communication.core.impl.DefaultCommunicationClientImpl)1 CommunicationConnectionFactory (com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionFactory)1 DubboCommunicationConnectionFactory (com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory)1 RmiCommunicationEndpoint (com.alibaba.otter.shared.communication.core.impl.rmi.RmiCommunicationEndpoint)1