use of com.b2international.snowowl.internal.eventbus.net4j.EventBusProtocolInjector 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