public interface MessageCallback
@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
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.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.