public class SimpleBrokerMessageHandler extends AbstractBrokerMessageHandler
SimpMessageType
, keeps track of subscriptions with the help of a
SubscriptionRegistry
and sends messages to subscribers.logger
Constructor and Description |
---|
SimpleBrokerMessageHandler(SubscribableChannel clientInboundChannel,
MessageChannel clientOutboundChannel,
SubscribableChannel brokerChannel,
Collection<String> destinationPrefixes)
Create a SimpleBrokerMessageHandler instance with the given message channels
and destination prefixes.
|
Modifier and Type | Method and Description |
---|---|
SubscribableChannel |
getBrokerChannel() |
SubscribableChannel |
getClientInboundChannel() |
MessageChannel |
getClientOutboundChannel() |
SubscriptionRegistry |
getSubscriptionRegistry() |
protected void |
handleMessageInternal(Message<?> message) |
protected void |
sendMessageToSubscribers(String destination,
Message<?> message) |
void |
setSubscriptionRegistry(SubscriptionRegistry subscriptionRegistry) |
void |
startInternal() |
void |
stopInternal() |
checkDestinationPrefix, getApplicationEventPublisher, getDestinationPrefixes, getPhase, handleMessage, isAutoStartup, isRunning, publishBrokerAvailableEvent, publishBrokerUnavailableEvent, setApplicationEventPublisher, setAutoStartup, start, stop, stop
public SimpleBrokerMessageHandler(SubscribableChannel clientInboundChannel, MessageChannel clientOutboundChannel, SubscribableChannel brokerChannel, Collection<String> destinationPrefixes)
clientInboundChannel
- the channel for receiving messages from clients (e.g. WebSocket clients)clientOutboundChannel
- the channel for sending messages to clients (e.g. WebSocket clients)brokerChannel
- the channel for the application to send messages to the brokerpublic SubscribableChannel getClientInboundChannel()
public MessageChannel getClientOutboundChannel()
public SubscribableChannel getBrokerChannel()
public void setSubscriptionRegistry(SubscriptionRegistry subscriptionRegistry)
public SubscriptionRegistry getSubscriptionRegistry()
public void startInternal()
startInternal
in class AbstractBrokerMessageHandler
public void stopInternal()
stopInternal
in class AbstractBrokerMessageHandler
protected void handleMessageInternal(Message<?> message)
handleMessageInternal
in class AbstractBrokerMessageHandler