public class DefaultSockJsService extends TransportHandlingSockJsService implements ServletContextAware
SockJsService
with all default TransportHandler
implementations pre-registered.allowedOrigins, logger
Constructor and Description |
---|
DefaultSockJsService(TaskScheduler scheduler)
Create a DefaultSockJsService with default
handler types. |
DefaultSockJsService(TaskScheduler scheduler,
java.util.Collection<TransportHandler> handlerOverrides)
Create a DefaultSockJsService with overridden
handler types
replacing the corresponding default handler implementation. |
DefaultSockJsService(TaskScheduler scheduler,
TransportHandler... handlerOverrides)
Create a DefaultSockJsService with overridden
handler types
replacing the corresponding default handler implementation. |
Modifier and Type | Method and Description |
---|---|
void |
setServletContext(ServletContext servletContext)
Set the
ServletContext that this object runs in. |
getHandshakeInterceptors, getMessageCodec, getTransportHandlers, handleRawWebSocketRequest, handleTransportRequest, isRunning, setHandshakeInterceptors, setMessageCodec, start, stop, validateRequest
addCacheHeaders, addNoCacheHeaders, checkOrigin, getAllowedOrigins, getCorsConfiguration, getDisconnectDelay, getHeartbeatTime, getHttpMessageCacheSize, getName, getSockJsClientLibraryUrl, getStreamBytesLimit, getTaskScheduler, handleRequest, isSessionCookieNeeded, isWebSocketEnabled, sendMethodNotAllowed, setAllowedOrigins, setDisconnectDelay, setHeartbeatTime, setHttpMessageCacheSize, setName, setSessionCookieNeeded, setSockJsClientLibraryUrl, setStreamBytesLimit, setSuppressCors, setWebSocketEnabled, shouldSuppressCors
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHeartbeatTime, getHttpMessageCacheSize, getStreamBytesLimit, getTaskScheduler
public DefaultSockJsService(TaskScheduler scheduler)
handler
types.scheduler
- a task scheduler for heart-beat messages and removing
timed-out sessions; the provided TaskScheduler should be declared as a
Spring bean to ensure it is initialized at start up and shut down when the
application stops.public DefaultSockJsService(TaskScheduler scheduler, TransportHandler... handlerOverrides)
handler
types
replacing the corresponding default handler implementation.scheduler
- a task scheduler for heart-beat messages and removing timed-out sessions;
the provided TaskScheduler should be declared as a Spring bean to ensure it gets
initialized at start-up and shuts down when the application stopshandlerOverrides
- zero or more overrides to the default transport handler typespublic DefaultSockJsService(TaskScheduler scheduler, java.util.Collection<TransportHandler> handlerOverrides)
handler
types
replacing the corresponding default handler implementation.scheduler
- a task scheduler for heart-beat messages and removing timed-out sessions;
the provided TaskScheduler should be declared as a Spring bean to ensure it gets
initialized at start-up and shuts down when the application stopshandlerOverrides
- zero or more overrides to the default transport handler typespublic void setServletContext(ServletContext servletContext)
ServletContextAware
ServletContext
that this object runs in.
Invoked after population of normal bean properties but before an init
callback like InitializingBean's afterPropertiesSet
or a
custom init-method. Invoked after ApplicationContextAware's
setApplicationContext
.
setServletContext
in interface ServletContextAware
servletContext
- the ServletContext object to be used by this objectInitializingBean.afterPropertiesSet()
,
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)