org.springframework.web.socket.config.annotation

## Class WebMvcStompWebSocketEndpointRegistration

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

All Implemented Interfaces:
  StompWebSocketEndpointRegistration

    public class WebMvcStompWebSocketEndpointRegistration
    extends Object
    implements StompWebSocketEndpointRegistration

An abstract base class for configuring STOMP over WebSocket/SockJS endpoints.

Since:
  4.0
Author:
  Rossen Stoyanchev

### Constructor Summary

Constructors
Constructor and Description
`WebMvcStompWebSocketEndpointRegistration(String[] paths, WebSocketHandler webSocketHandler, org.springframework.scheduling.TaskScheduler sockJsTaskScheduler)`

### Method Summary

All Methods Instance Methods Concrete Methods
`StompWebSocketEndpointRegistration` `addInterceptors(HandshakeInterceptor... interceptors)` Configure the HandshakeInterceptor's to use.
`protected HandshakeInterceptor[]` `getInterceptors()`
`org.springframework.util.MultiValueMap<org.springframework.web.HttpRequestHandler,String>` `getMappings()`
`StompWebSocketEndpointRegistration` `setAllowedOrigins(String... allowedOrigins)` Configure allowed `Origin` header values.
`StompWebSocketEndpointRegistration` `setHandshakeHandler(HandshakeHandler handshakeHandler)` Configure the HandshakeHandler to use.
`SockJsServiceRegistration` `withSockJS()` Enable SockJS fallback options.

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

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

### Constructor Detail

#### WebMvcStompWebSocketEndpointRegistration

    public WebMvcStompWebSocketEndpointRegistration(String[] paths,
                                                    WebSocketHandler webSocketHandler,
                                                    org.springframework.scheduling.TaskScheduler sockJsTaskScheduler)

### Method Detail

#### setHandshakeHandler

    public StompWebSocketEndpointRegistration setHandshakeHandler(HandshakeHandler handshakeHandler)

Description copied from interface: `StompWebSocketEndpointRegistration`
Configure the HandshakeHandler to use.

Specified by:
  `setHandshakeHandler` in interface `StompWebSocketEndpointRegistration`

#### addInterceptors

    public StompWebSocketEndpointRegistration addInterceptors(HandshakeInterceptor... interceptors)

Description copied from interface: `StompWebSocketEndpointRegistration`
Configure the HandshakeInterceptor's to use.

Specified by:
  `addInterceptors` in interface `StompWebSocketEndpointRegistration`

#### setAllowedOrigins

    public StompWebSocketEndpointRegistration setAllowedOrigins(String... allowedOrigins)

Description copied from interface: `StompWebSocketEndpointRegistration`
Configure allowed `Origin` header values. This check is mostly designed for browser clients. There is nothing preventing other types of client to modify the `Origin` header value.

When SockJS is enabled and origins are restricted, transport types that do not allow to check request origin (Iframe based transports) are disabled. As a consequence, IE 6 to 9 are not supported when origins are restricted.

Each provided allowed origin must start by "http://", "https://" or be "*" (means that all origins are allowed). By default, only same origin requests are allowed (empty list).

Specified by:
  `setAllowedOrigins` in interface `StompWebSocketEndpointRegistration`
See Also:
  RFC 6454: The Web Origin Concept, SockJS supported transports by browser

#### withSockJS

    public SockJsServiceRegistration withSockJS()

Description copied from interface: `StompWebSocketEndpointRegistration`
Enable SockJS fallback options.

Specified by:
  `withSockJS` in interface `StompWebSocketEndpointRegistration`

#### getInterceptors

    protected HandshakeInterceptor[] getInterceptors()

#### getMappings

    public final org.springframework.util.MultiValueMap<org.springframework.web.HttpRequestHandler,String> getMappings()