public class DatabaseClusterMessagingService extends Object implements ClusterMessagingService
ClusterMessagingService
that wraps an existing
MessageHandlerService
in order to provide an API that can be consumed by plugins.Constructor and Description |
---|
DatabaseClusterMessagingService(MessageHandlerService messageHandlerService) |
Modifier and Type | Method and Description |
---|---|
void |
registerListener(String channel,
ClusterMessageConsumer consumer)
Register a ClusterMessageConsumer to receive messages sent to the nominated channel.
|
void |
sendRemote(String channel,
String message)
Sends an inter-node message to registered listeners, listeners on the node the message was raised will not be
notified.
|
void |
unregisterListener(ClusterMessageConsumer consumer)
Removes a ClusterMessageConsumer from all channels.
|
void |
unregisterListener(String channel,
ClusterMessageConsumer consumer)
Removes a ClusterMessageConsumer from the channel.
|
public DatabaseClusterMessagingService(MessageHandlerService messageHandlerService)
public void registerListener(String channel, ClusterMessageConsumer consumer)
ClusterMessagingService
registerListener
in interface ClusterMessagingService
channel
- The name of the channelconsumer
- The consumer that will receive messagespublic void unregisterListener(String channel, ClusterMessageConsumer consumer)
ClusterMessagingService
unregisterListener
in interface ClusterMessagingService
channel
- The name of the channelconsumer
- The consumer to be unregisteredpublic void unregisterListener(ClusterMessageConsumer consumer)
ClusterMessagingService
unregisterListener
in interface ClusterMessagingService
consumer
- The consumer to be unregisteredpublic void sendRemote(String channel, String message)
ClusterMessagingService
sendRemote
in interface ClusterMessagingService
channel
- The name of the channel (up to 20 alphanumeric characters in length)message
- The message to send (up to 200 characters in length)Copyright © 2002-2015 Atlassian. All Rights Reserved.