org.springframework.web.socket.config.annotation

## Class WebMvcStompEndpointRegistry

- java.lang.Object
- - org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry

All Implemented Interfaces:
  StompEndpointRegistry

    public class WebMvcStompEndpointRegistry
    extends Object
    implements 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 Summary

Constructors
Constructor and Description
`WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, org.springframework.scheduling.TaskScheduler defaultSockJsTaskScheduler)`

### Method Summary

All Methods Instance Methods Concrete Methods
`StompWebSocketEndpointRegistration` `addEndpoint(String... paths)` Register a STOMP over WebSocket endpoint at the given mapping path.
`org.springframework.web.servlet.handler.AbstractHandlerMapping` `getHandlerMapping()` Return a handler mapping with the mapped ViewControllers.
`protected int` `getOrder()`
`protected org.springframework.web.util.UrlPathHelper` `getUrlPathHelper()`
`protected void` `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
`WebMvcStompEndpointRegistry` `setErrorHandler(StompSubProtocolErrorHandler errorHandler)` Configure a handler for customizing or handling STOMP ERROR frames to clients.
`void` `setOrder(int order)` Set the order for the resulting `HandlerMapping` relative to other handler mappings configured in Spring MVC.
`void` `setUrlPathHelper(org.springframework.web.util.UrlPathHelper urlPathHelper)` Set the UrlPathHelper to configure on the `HandlerMapping` used to map handshake requests.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WebMvcStompEndpointRegistry

    public WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler,
                                       WebSocketTransportRegistration transportRegistration,
                                       org.springframework.scheduling.TaskScheduler defaultSockJsTaskScheduler)

### Method Detail

#### addEndpoint

    public StompWebSocketEndpointRegistration addEndpoint(String... paths)

Description copied from interface: `StompEndpointRegistry`
Register a STOMP over WebSocket endpoint at the given mapping path.

Specified by:
  `addEndpoint` in interface `StompEndpointRegistry`

#### setOrder

    public void setOrder(int order)

Set the order for the resulting `HandlerMapping` relative to other handler mappings configured in Spring MVC.

The default value is 1.

Specified by:
  `setOrder` in interface `StompEndpointRegistry`

#### getOrder

    protected int getOrder()

#### setUrlPathHelper

    public void setUrlPathHelper(@Nullable
                                 org.springframework.web.util.UrlPathHelper urlPathHelper)

Set the UrlPathHelper to configure on the `HandlerMapping` used to map handshake requests.

Specified by:
  `setUrlPathHelper` in interface `StompEndpointRegistry`

#### getUrlPathHelper

    @Nullable
    protected org.springframework.web.util.UrlPathHelper getUrlPathHelper()

#### setErrorHandler

    public WebMvcStompEndpointRegistry setErrorHandler(StompSubProtocolErrorHandler errorHandler)

Description copied from interface: `StompEndpointRegistry`
Configure a handler for customizing or handling STOMP ERROR frames to clients.

Specified by:
  `setErrorHandler` in interface `StompEndpointRegistry`
Parameters:
  `errorHandler` - the error handler

#### setApplicationContext

    protected void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

#### getHandlerMapping

    public org.springframework.web.servlet.handler.AbstractHandlerMapping getHandlerMapping()

Return a handler mapping with the mapped ViewControllers.