use of com.alibaba.otter.shared.communication.core.impl.DefaultCommunicationClientImpl in project otter by alibaba.
the class ArbitrateCommmunicationClient method callManager.
/**
* 指定manager,进行event调用
*
* <pre>
* 注意:该方法为异步调用
* </pre>
*/
public void callManager(final Event event, final Callback callback) {
if (delegate instanceof DefaultCommunicationClientImpl) {
DefaultCommunicationClientImpl defaultClient = (DefaultCommunicationClientImpl) delegate;
defaultClient.submit(new Runnable() {
@Override
public void run() {
Object result = callManager(event);
callback.call(result);
}
});
}
}
use of com.alibaba.otter.shared.communication.core.impl.DefaultCommunicationClientImpl in project otter by alibaba.
the class RmiCommunicationTest method initial.
@BeforeClass
public void initial() {
RmiCommunicationEndpoint endpoint1099 = new RmiCommunicationEndpoint(1099);
endpoint1099.setAlwaysCreateRegistry(false);
endpoint1099.initial();
RmiCommunicationEndpoint endpoint1098 = new RmiCommunicationEndpoint(1098);
endpoint1098.setAlwaysCreateRegistry(false);
endpoint1098.initial();
CommunicationConnectionPoolFactory factory = new CommunicationConnectionPoolFactory(new RmiCommunicationConnectionFactory());
factory.initial();
client = new DefaultCommunicationClientImpl(factory);
client.initial();
}
use of com.alibaba.otter.shared.communication.core.impl.DefaultCommunicationClientImpl 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();
}
Aggregations