|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageCallback
Callback interface for receiving messages on the bus. To receive messages on
the message bus, create an implementation of this interface, then either
annotate it with @Service
or register it with the bus via a
call to MessageBus.subscribe(String, MessageCallback)
or
MessageBus.subscribeLocal(String, MessageCallback)
.
The subject of messages that a particular MessageCallback is interested in is
specified when it is registered with the bus, however it is common practice
for a MessageCallback class to have the same name as the bus subject it
receives messages for. The @Service
annotation makes this
approach quite natural.
Service
,
MessageBus
Method Summary | |
---|---|
void |
callback(Message message)
Called by the Message Bus every time it processes a message with the subject this callback is registered for. |
Method Detail |
---|
void callback(Message message)
message
- The message on the bus. Avoid making changes to this object,
because it will continue to be reused by the framework and the
same Message instance will be passed to other callbacks.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |