Search in sources :

Example 1 with ClientProtocolFactory

use of org.eclipse.spi.net4j.ClientProtocolFactory in project snow-owl by b2ihealthcare.

the class TransportClient method openCustomProtocols.

@SuppressWarnings("unchecked")
private void openCustomProtocols() {
    // other client protocols
    final List<ClientProtocolFactory> protocolFactories = getRegisteredClientProtocolFactories();
    for (final ClientProtocolFactory clientProtocolFactory : protocolFactories) {
        final SignalProtocol<Object> protocol = (SignalProtocol<Object>) clientProtocolFactory.create("");
        openProtocol(protocol);
    }
    // also set up the RPC client...
    final RpcProtocol rpcProtocol = RpcUtil.getRpcClientProtocol(IPluginContainer.INSTANCE);
    openProtocol(rpcProtocol);
    if (!env.isServer()) {
        // ...the event bus, too.
        final IEventBusProtocol eventBusProtocol = EventBusNet4jUtil.getClientProtocol(IPluginContainer.INSTANCE);
        openProtocol(eventBusProtocol);
    }
}
Also used : ClientProtocolFactory(org.eclipse.spi.net4j.ClientProtocolFactory) RpcProtocol(com.b2international.snowowl.rpc.RpcProtocol) SignalProtocol(org.eclipse.net4j.signal.SignalProtocol) ISignalProtocol(org.eclipse.net4j.signal.ISignalProtocol) IEventBusProtocol(com.b2international.snowowl.eventbus.net4j.IEventBusProtocol)

Aggregations

IEventBusProtocol (com.b2international.snowowl.eventbus.net4j.IEventBusProtocol)1 RpcProtocol (com.b2international.snowowl.rpc.RpcProtocol)1 ISignalProtocol (org.eclipse.net4j.signal.ISignalProtocol)1 SignalProtocol (org.eclipse.net4j.signal.SignalProtocol)1 ClientProtocolFactory (org.eclipse.spi.net4j.ClientProtocolFactory)1