public class StompBrokerRelayRegistration extends AbstractBrokerRegistration
StompBrokerRelayMessageHandler
.Constructor and Description |
---|
StompBrokerRelayRegistration(SubscribableChannel clientInboundChannel,
MessageChannel clientOutboundChannel,
java.lang.String[] destinationPrefixes) |
Modifier and Type | Method and Description |
---|---|
protected StompBrokerRelayMessageHandler |
getMessageHandler(SubscribableChannel brokerChannel) |
protected java.lang.String |
getUserDestinationBroadcast() |
protected java.lang.String |
getUserRegistryBroadcast() |
StompBrokerRelayRegistration |
setAutoStartup(boolean autoStartup)
Configure whether the
StompBrokerRelayMessageHandler should start
automatically when the Spring ApplicationContext is refreshed. |
StompBrokerRelayRegistration |
setClientLogin(java.lang.String login)
Set the login to use when creating connections to the STOMP broker on
behalf of connected clients.
|
StompBrokerRelayRegistration |
setClientPasscode(java.lang.String passcode)
Set the passcode to use when creating connections to the STOMP broker on
behalf of connected clients.
|
StompBrokerRelayRegistration |
setRelayHost(java.lang.String relayHost)
Set the STOMP message broker host.
|
StompBrokerRelayRegistration |
setRelayPort(int relayPort)
Set the STOMP message broker port.
|
StompBrokerRelayRegistration |
setSystemHeartbeatReceiveInterval(long heartbeatReceiveInterval)
Set the maximum interval, in milliseconds, at which the "system" relay session
expects, in the absence of any other data, to receive a heartbeat from the STOMP
broker.
|
StompBrokerRelayRegistration |
setSystemHeartbeatSendInterval(long systemHeartbeatSendInterval)
Set the interval, in milliseconds, at which the "system" relay session will,
in the absence of any other data being sent, send a heartbeat to the STOMP broker.
|
StompBrokerRelayRegistration |
setSystemLogin(java.lang.String login)
Set the login for the shared "system" connection used to send messages to
the STOMP broker from within the application, i.e.
|
StompBrokerRelayRegistration |
setSystemPasscode(java.lang.String passcode)
Set the passcode for the shared "system" connection used to send messages to
the STOMP broker from within the application, i.e.
|
void |
setTcpClient(TcpOperations<byte[]> tcpClient)
Configure a TCP client for managing TCP connections to the STOMP broker.
|
StompBrokerRelayRegistration |
setUserDestinationBroadcast(java.lang.String destination)
Set a destination to broadcast messages to user destinations that remain
unresolved because the user appears not to be connected.
|
StompBrokerRelayRegistration |
setUserRegistryBroadcast(java.lang.String destination)
Set a destination to broadcast the content of the local user registry to
and to listen for such broadcasts from other servers.
|
StompBrokerRelayRegistration |
setVirtualHost(java.lang.String virtualHost)
Set the value of the "host" header to use in STOMP CONNECT frames.
|
getClientInboundChannel, getClientOutboundChannel, getDestinationPrefixes
public StompBrokerRelayRegistration(SubscribableChannel clientInboundChannel, MessageChannel clientOutboundChannel, java.lang.String[] destinationPrefixes)
public StompBrokerRelayRegistration setRelayHost(java.lang.String relayHost)
public StompBrokerRelayRegistration setRelayPort(int relayPort)
public StompBrokerRelayRegistration setClientLogin(java.lang.String login)
By default this is set to "guest".
public StompBrokerRelayRegistration setClientPasscode(java.lang.String passcode)
By default this is set to "guest".
public StompBrokerRelayRegistration setSystemLogin(java.lang.String login)
By default this is set to "guest".
public StompBrokerRelayRegistration setSystemPasscode(java.lang.String passcode)
By default this is set to "guest".
public StompBrokerRelayRegistration setSystemHeartbeatSendInterval(long systemHeartbeatSendInterval)
The default value is 10000.
public StompBrokerRelayRegistration setSystemHeartbeatReceiveInterval(long heartbeatReceiveInterval)
The default value is 10000.
public StompBrokerRelayRegistration setVirtualHost(java.lang.String virtualHost)
By default this property is not set.
public void setTcpClient(TcpOperations<byte[]> tcpClient)
By default ReactorNettyTcpClient
is used.
Note: when this property is used, any
host
or port
specified are effectively ignored.
public StompBrokerRelayRegistration setAutoStartup(boolean autoStartup)
StompBrokerRelayMessageHandler
should start
automatically when the Spring ApplicationContext is refreshed.
The default setting is true
.
public StompBrokerRelayRegistration setUserDestinationBroadcast(java.lang.String destination)
By default this is not set.
destination
- the destination to broadcast unresolved messages to,
e.g. "/topic/unresolved-user-destination"@Nullable protected java.lang.String getUserDestinationBroadcast()
public StompBrokerRelayRegistration setUserRegistryBroadcast(java.lang.String destination)
By default this is not set.
destination
- the destination for broadcasting user registry details,
e.g. "/topic/simp-user-registry".@Nullable protected java.lang.String getUserRegistryBroadcast()
protected StompBrokerRelayMessageHandler getMessageHandler(SubscribableChannel brokerChannel)
getMessageHandler
in class AbstractBrokerRegistration