Class WebMvcStompEndpointRegistry
java.lang.Object
org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry
- All Implemented Interfaces:
- StompEndpointRegistry
A registry for STOMP over WebSocket endpoints that maps the endpoints with a
HandlerMapping for use in Spring MVC.- Since:
- 4.0
- Author:
- Rossen Stoyanchev, Artem Bilan
- 
Constructor SummaryConstructorsConstructorDescriptionWebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, TaskScheduler defaultSockJsTaskScheduler) 
- 
Method SummaryModifier and TypeMethodDescriptionaddEndpoint(String... paths) Register a STOMP over WebSocket endpoint at the given mapping path.Return a handler mapping with the mapped ViewControllers.protected intgetOrder()protected @Nullable UrlPathHelperDeprecated, for removal: This API element is subject to removal in a future version.protected booleanprotected voidsetApplicationContext(ApplicationContext applicationContext) setErrorHandler(StompSubProtocolErrorHandler errorHandler) Configure a handler for customizing or handling STOMP ERROR frames to clients.voidsetOrder(int order) Set the order for the resultingHandlerMappingrelative to other handler mappings configured in Spring MVC.setPreserveReceiveOrder(boolean preserveReceiveOrder) Whether to handle client messages sequentially in the order in which they were received.voidsetUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Constructor Details- 
WebMvcStompEndpointRegistrypublic WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, TaskScheduler defaultSockJsTaskScheduler) 
 
- 
- 
Method Details- 
addEndpointDescription copied from interface:StompEndpointRegistryRegister a STOMP over WebSocket endpoint at the given mapping path.- Specified by:
- addEndpointin interface- StompEndpointRegistry
 
- 
setOrderpublic void setOrder(int order) Set the order for the resultingHandlerMappingrelative to other handler mappings configured in Spring MVC.The default value is 1. - Specified by:
- setOrderin interface- StompEndpointRegistry
 
- 
getOrderprotected int getOrder()
- 
setUrlPathHelper@Deprecated(since="7.0", forRemoval=true) public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.Set the UrlPathHelper to configure on theHandlerMappingused to map handshake requests.- Specified by:
- setUrlPathHelperin interface- StompEndpointRegistry
 
- 
getUrlPathHelperDeprecated, for removal: This API element is subject to removal in a future version.
- 
setErrorHandlerDescription copied from interface:StompEndpointRegistryConfigure a handler for customizing or handling STOMP ERROR frames to clients.- Specified by:
- setErrorHandlerin interface- StompEndpointRegistry
- Parameters:
- errorHandler- the error handler
 
- 
setPreserveReceiveOrderDescription copied from interface:StompEndpointRegistryWhether to handle client messages sequentially in the order in which they were received.By default messages sent to the "clientInboundChannel"may be handled in parallel and not in the same order as they were received because the channel is backed by a ThreadPoolExecutor that in turn does not guarantee processing in order.When this flag is set to truemessages within the same session will be sent to the"clientInboundChannel"one at a time in order to preserve the order in which they were received.- Specified by:
- setPreserveReceiveOrderin interface- StompEndpointRegistry
 
- 
isPreserveReceiveOrderprotected boolean isPreserveReceiveOrder()
- 
setApplicationContext
- 
getHandlerMappingReturn a handler mapping with the mapped ViewControllers.
 
- 
PathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.