Package net.engio.mbassy.bus.common
Interface GenericMessagePublicationSupport<T,P extends IPublicationCommand>
- All Superinterfaces:
ErrorHandlingSupport
,PubSubSupport<T>
,RuntimeProvider
- All Known Subinterfaces:
IMessageBus<T,
,P> ISyncMessageBus<T,
P>
- All Known Implementing Classes:
AbstractSyncAsyncMessageBus
,MBassador
,SyncMessageBus
public interface GenericMessagePublicationSupport<T,P extends IPublicationCommand>
extends PubSubSupport<T>, ErrorHandlingSupport
This interface is meant to be implemented by different bus implementations to offer a consistent way
to plugin different methods of message publication.
The parametrization of the IPostCommand influences which publication methods (asynchronous, synchronous or
conditional etc.) are available.
-
Method Summary
Methods inherited from interface net.engio.mbassy.bus.common.ErrorHandlingSupport
getRegisteredErrorHandlers
Methods inherited from interface net.engio.mbassy.bus.common.PubSubSupport
publish, subscribe, unsubscribe
Methods inherited from interface net.engio.mbassy.bus.common.RuntimeProvider
getRuntime
-
Method Details
-
post
Publish a message to the bus using on of its supported message publication mechanisms. The supported mechanisms depend on the available implementation and are exposed as subclasses of IPublicationCommand. The standard mechanism is the synchronous dispatch which will publish the message in the current thread and returns after every matching handler has been invoked.- Parameters:
message
- - Any subtype of T welcome- Returns:
- An object that provides access to the available publication methods supported by the message bus.
-