public class StompBrokerRelayMessageHandler extends Object implements MessageHandler, org.springframework.context.SmartLifecycle
| Constructor and Description |
|---|
StompBrokerRelayMessageHandler(MessageChannel messageChannel,
Collection<String> destinationPrefixes) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkDestinationPrefix(StompCommand command,
String destination) |
String[] |
getDestinationPrefixes() |
int |
getPhase() |
String |
getRelayHost() |
int |
getRelayPort() |
String |
getSystemLogin() |
String |
getSystemPasscode() |
void |
handleMessage(Message<?> message)
Handles the message if possible.
|
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setRelayHost(String relayHost)
Set the STOMP message broker host.
|
void |
setRelayPort(int relayPort)
Set the STOMP message broker port.
|
void |
setSystemLogin(String systemLogin)
Set the login for a "system" TCP connection used to send messages to the STOMP
broker without having a client session (e.g.
|
void |
setSystemPasscode(String systemPasscode)
Set the passcode for a "system" TCP connection used to send messages to the STOMP
broker without having a client session (e.g.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public StompBrokerRelayMessageHandler(MessageChannel messageChannel, Collection<String> destinationPrefixes)
messageChannel - the channel to send messages from the STOMP broker todestinationPrefixes - the broker supported destination prefixes; destinations
that do not match the given prefix are ignored.public void setRelayHost(String relayHost)
public String getRelayHost()
public void setRelayPort(int relayPort)
public int getRelayPort()
public void setSystemLogin(String systemLogin)
public String getSystemLogin()
public void setSystemPasscode(String systemPasscode)
public String getSystemPasscode()
public String[] getDestinationPrefixes()
public boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic void stop(Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void handleMessage(Message<?> message)
MessageHandlerMessageRejectedException e.g.
in case of a Selective Consumer. When a consumer tries to handle a
message, but fails to do so, a MessageHandlingException is
thrown. In the last case it is recommended to treat the message as tainted
and go into an error scenario.
When the handling results in a failure of another message being sent
(e.g. a "reply" message), that failure will trigger a
MessageDeliveryException.
handleMessage in interface MessageHandlermessage - the message to be handled
reply related to the handling of the messageprotected boolean checkDestinationPrefix(StompCommand command, String destination)