use of org.eclipse.net4j.connector.IConnector in project snow-owl by b2ihealthcare.
the class AbstractRpcTest method initializeService.
protected T initializeService() {
final IConnector connector = JVMUtil.getConnector(container, JVM_DESCRIPTION);
serviceImplementation = createServiceImplementation();
final SingleServiceLookup<U> singleServiceLookup = new SingleServiceLookup<U>(serviceImplementation);
final RpcSession initialServerSession = RpcUtil.getInitialServerSession(container);
initialServerSession.registerClassLoader(serviceInterfaceClass, serviceImplementation.getClass().getClassLoader());
initialServerSession.registerServiceLookup(singleServiceLookup);
final RpcProtocol protocol = RpcUtil.getRpcClientProtocol(container);
protocol.registerClassLoader(serviceInterfaceClass, serviceInterfaceClass.getClassLoader());
protocol.open(connector);
protocol.setTimeout(PROTOCOL_TIMEOUT_MILLIS);
return protocol.getServiceProxy(serviceInterfaceClass);
}
Aggregations