net.engio.mbassy.bus.config.Feature Java Examples

The following examples show how to use net.engio.mbassy.bus.config.Feature. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MessageBus.java    From PeerWasp with MIT License 5 votes vote down vote up
private static BusConfiguration createBusConfiguration() {
	BusConfiguration config = new BusConfiguration();
	// synchronous dispatching of events
	config.addFeature(Feature.SyncPubSub.Default());
	// asynchronous dispatching of events
	config.addFeature(Feature.AsynchronousHandlerInvocation.Default());
	config.addFeature(Feature.AsynchronousMessageDispatch.Default());
	return config;
}
 
Example #2
Source File: TaskModel.java    From robovm-samples with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new {@link TaskModel} backed by the specified
 * {@link TaskManager}.
 */
public TaskModel(TaskManager taskManager) {
    this.taskManager = Objects.requireNonNull(taskManager, "taskManager");
    this.bus = new MBassador<Object>(new BusConfiguration()
            .addFeature(Feature.SyncPubSub.Default())
            .addFeature(Feature.AsynchronousHandlerInvocation.Default())
            .addFeature(Feature.AsynchronousMessageDispatch.Default()));
}
 
Example #3
Source File: ClientModel.java    From robovm-samples with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new {@link ClientModel} backed by the specified
 * {@link ClientManager}.
 */
public ClientModel(ClientManager clientManager) {
    this.clientManager = Objects.requireNonNull(clientManager, "clientManager");
    this.bus = new MBassador<Object>(new BusConfiguration()
            .addFeature(Feature.SyncPubSub.Default())
            .addFeature(Feature.AsynchronousHandlerInvocation.Default())
            .addFeature(Feature.AsynchronousMessageDispatch.Default()));
}
 
Example #4
Source File: EventBus.java    From Hive2Hive with MIT License 5 votes vote down vote up
private static BusConfiguration createBusConfiguration() {
	BusConfiguration config = new BusConfiguration();
	// synchronous dispatching of events
	config.addFeature(Feature.SyncPubSub.Default());
	// asynchronous dispatching of events
	config.addFeature(Feature.AsynchronousHandlerInvocation.Default());
	config.addFeature(Feature.AsynchronousMessageDispatch.Default());
	return config;
}