public class SockJsServiceRegistration extends Object
@EnableWebSocket and
WebSocketConfigurer.| Constructor and Description |
|---|
SockJsServiceRegistration(org.springframework.scheduling.TaskScheduler defaultTaskScheduler) |
| Modifier and Type | Method and Description |
|---|---|
protected SockJsService |
getSockJsService(String[] sockJsPrefixes) |
SockJsServiceRegistration |
setClientLibraryUrl(String clientLibraryUrl)
Transports which don't support cross-domain communication natively (e.g.
|
SockJsServiceRegistration |
setDisconnectDelay(long disconnectDelay)
The amount of time in milliseconds before a client is considered
disconnected after not having a receiving connection, i.e.
|
SockJsServiceRegistration |
setDummySessionCookieEnabled(boolean sessionCookieEnabled)
Some load balancers do sticky sessions, but only if there is a "JSESSIONID"
cookie.
|
SockJsServiceRegistration |
setHeartbeatTime(long heartbeatTime)
The amount of time in milliseconds when the server has not sent any
messages and after which the server should send a heartbeat frame to the
client in order to keep the connection from breaking.
|
SockJsServiceRegistration |
setHttpMessageCacheSize(int httpMessageCacheSize)
The number of server-to-client messages that a session can cache while waiting for
the next HTTP polling request from the client.
|
SockJsServiceRegistration |
setInterceptors(HandshakeInterceptor... interceptors) |
SockJsServiceRegistration |
setStreamBytesLimit(int streamBytesLimit)
Streaming transports save responses on the client side and don't free
memory used by delivered messages.
|
SockJsServiceRegistration |
setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler) |
SockJsServiceRegistration |
setTransportHandlerOverrides(TransportHandler... handlers) |
SockJsServiceRegistration |
setTransportHandlers(TransportHandler... handlers) |
SockJsServiceRegistration |
setWebSocketEnabled(boolean webSocketEnabled)
Some load balancers don't support WebSocket.
|
public SockJsServiceRegistration(org.springframework.scheduling.TaskScheduler defaultTaskScheduler)
public SockJsServiceRegistration setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
public SockJsServiceRegistration setClientLibraryUrl(String clientLibraryUrl)
By default this is set to point to "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js".
public SockJsServiceRegistration setStreamBytesLimit(int streamBytesLimit)
The default value is 128K (i.e. 128 * 1024).
public SockJsServiceRegistration setDummySessionCookieEnabled(boolean sessionCookieEnabled)
The default value is "false" since Java servers set the session cookie.
public SockJsServiceRegistration setHeartbeatTime(long heartbeatTime)
The default value is 25,000 (25 seconds).
public SockJsServiceRegistration setDisconnectDelay(long disconnectDelay)
The default value is 5000.
public SockJsServiceRegistration setHttpMessageCacheSize(int httpMessageCacheSize)
The amount of time between HTTP requests should be relatively brief and will not
exceed the allows disconnect delay (see
setDisconnectDelay(long)), 5 seconds by default.
The default size is 100.
public SockJsServiceRegistration setWebSocketEnabled(boolean webSocketEnabled)
The default value is "true".
public SockJsServiceRegistration setTransportHandlers(TransportHandler... handlers)
public SockJsServiceRegistration setTransportHandlerOverrides(TransportHandler... handlers)
public SockJsServiceRegistration setInterceptors(HandshakeInterceptor... interceptors)
protected SockJsService getSockJsService(String[] sockJsPrefixes)