Class SimpleBrokerRegistration
java.lang.Object
org.springframework.messaging.simp.config.AbstractBrokerRegistration
org.springframework.messaging.simp.config.SimpleBrokerRegistration
Registration class for configuring a 
SimpleBrokerMessageHandler.- Since:
- 4.0
- Author:
- Rossen Stoyanchev, Sam Brannen
- 
Constructor SummaryConstructorsConstructorDescriptionSimpleBrokerRegistration(SubscribableChannel clientInboundChannel, MessageChannel clientOutboundChannel, String[] destinationPrefixes) Create a newSimpleBrokerRegistration.
- 
Method SummaryModifier and TypeMethodDescriptionprotected SimpleBrokerMessageHandlergetMessageHandler(SubscribableChannel brokerChannel) setHeartbeatValue(long[] heartbeat) Configure the value for the heartbeat settings.voidsetSelectorHeaderName(@Nullable String selectorHeaderName) Configure the name of a header that a subscription message can have for the purpose of filtering messages matched to the subscription.setTaskScheduler(TaskScheduler taskScheduler) Configure theTaskSchedulerto use for providing heartbeat support.Methods inherited from class org.springframework.messaging.simp.config.AbstractBrokerRegistrationgetClientInboundChannel, getClientOutboundChannel, getDestinationPrefixes
- 
Constructor Details- 
SimpleBrokerRegistrationpublic SimpleBrokerRegistration(SubscribableChannel clientInboundChannel, MessageChannel clientOutboundChannel, String[] destinationPrefixes) Create a newSimpleBrokerRegistration.- Parameters:
- clientInboundChannel- the inbound channel
- clientOutboundChannel- the outbound channel
- destinationPrefixes- the destination prefixes
 
 
- 
- 
Method Details- 
setTaskSchedulerConfigure theTaskSchedulerto use for providing heartbeat support. Setting this property also sets theheartbeatValueto "10000, 10000".By default this is not set. - Since:
- 4.2
 
- 
setHeartbeatValueConfigure the value for the heartbeat settings. The first number represents how often the server will write or send a heartbeat. The second is how often the client should write. 0 means no heartbeats.By default this is set to "0, 0" unless the taskSchedulerin which case the default becomes "10000,10000" (in milliseconds).- Since:
- 4.2
 
- 
setSelectorHeaderNameConfigure the name of a header that a subscription message can have for the purpose of filtering messages matched to the subscription.The header value is expected to be a Spring Expression Language (SpEL) boolean expression to be applied to the headers of messages matched to the subscription. For example: headers.foo == 'bar' By default the selector header name is set to nullwhich disables this feature. You can set it to"selector"or a different name to enable support for a selector header.- Parameters:
- selectorHeaderName- the name to use for a selector header, or- nullor blank to disable selector header support
- Since:
- 4.3.17
 
- 
getMessageHandler- Specified by:
- getMessageHandlerin class- AbstractBrokerRegistration
 
 
-