- Enclosing class:
MessageBusHelper
public static interface MessageBusHelper.Adapter
An adapter between
MessageBusHelper and a specific message bus.-
Method Summary
Modifier and TypeMethodDescriptioncreateMethodAdapter(Object object, Method method, Class<T> topic) Creates aMessageBusHelper.MethodAdapterthat delivers the messages of the given topic to the given method of the given object.<T> voidPublishes a message with an explicit topic.voidPublishes a message.
-
Method Details
-
createMethodAdapter
@Nonnull <T> MessageBusHelper.MethodAdapter<T> createMethodAdapter(@Nonnull Object object, @Nonnull Method method, @Nonnull Class<T> topic) Creates aMessageBusHelper.MethodAdapterthat delivers the messages of the given topic to the given method of the given object.- Type Parameters:
T- the static type of the topic- Parameters:
object- the object that owns the methodmethod- the listener methodtopic- the topic- Returns:
- the
MethodAdapter
-
publish
Publishes a message. The topic is the class of the message.- Parameters:
message- the message
-
publish
Publishes a message with an explicit topic.- Type Parameters:
T- the static type of the topic- Parameters:
topic- the topicmessage- the message
-