use of org.eclipse.net4j.signal.wrapping.GZIPStreamWrapperInjector in project snow-owl by b2ihealthcare.
the class RpcUtil method prepareContainer.
/**
* @param container
*/
public static void prepareContainer(final IManagedContainer container, RpcConfiguration configuration, boolean gzip) {
container.registerFactory(new RpcProtocol.ClientFactory(configuration));
container.registerFactory(new RpcProtocol.ServerFactory(configuration));
container.registerFactory(new RpcSessionImpl.Factory());
container.addPostProcessor(new RpcServerProtocolInjector());
if (gzip) {
container.addPostProcessor(new GZIPStreamWrapperInjector(RpcProtocolConstants.TYPE));
}
}
use of org.eclipse.net4j.signal.wrapping.GZIPStreamWrapperInjector in project snow-owl by b2ihealthcare.
the class EventBusNet4jUtil method prepareContainer.
/**
* Prepares the given {@link IManagedContainer} to deliver message through {@link IEventBus} instances over the
* network.
*
* @param container
* @param gzip - to enable gzip compression on the protocol or not
* @param numberOfWorkers
*/
public static final void prepareContainer(IManagedContainer container, boolean gzip, int numberOfWorkers) {
container.registerFactory(new EventBusProtocol.ClientFactory());
container.registerFactory(new EventBusProtocol.ServerFactory());
container.registerFactory(new EventBus.Factory());
container.addPostProcessor(new EventBusProtocolInjector(numberOfWorkers));
if (gzip) {
container.addPostProcessor(new GZIPStreamWrapperInjector(EventBusConstants.PROTOCOL_NAME));
}
}
Aggregations