HttpRequestHandler that allows mapping a SockJsService to requests
in a Servlet container.
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private final SockJsService | |
| private final WebSocketHandler |
| Access | Constructor and Description |
|---|---|
| public | SockJsHttpRequestHandler(SockJsService
the SockJS service sockJsService, WebSocketHandler the websocket handler webSocketHandler)Create a new SockJsHttpRequestHandler. |
| Modifier and Type | Method and Description |
|---|---|
| public CorsConfiguration | getCorsConfiguration(HttpServletRequest request)
Implements org. Return a |
| private String | |
| public SockJsService | |
| public WebSocketHandler | |
| public void | handleRequest(HttpServletRequest
current HTTP request servletRequest, HttpServletResponse current HTTP response servletResponse)Implements org. Process the given request, generating a response. |
| public boolean | isRunning()
Implements org. Check whether this component is currently running. |
| public void | setServletContext(ServletContext
the ServletContext object to be used by this object servletContext)Implements org. Set the Invoked after population of normal bean properties but before an init
callback like InitializingBean's |
| public void | |
| public void | stop()
Implements org. Stop this component, typically in a synchronous fashion, such that the component is fully stopped upon return of this method. |
| running | back to summary |
|---|---|
| private volatile boolean running | |
| sockJsService | back to summary |
|---|---|
| private final SockJsService sockJsService | |
| webSocketHandler | back to summary |
|---|---|
| private final WebSocketHandler webSocketHandler | |
| SockJsHttpRequestHandler | back to summary |
|---|---|
| public SockJsHttpRequestHandler(SockJsService sockJsService, WebSocketHandler webSocketHandler) Create a new SockJsHttpRequestHandler.
| |
| getCorsConfiguration | back to summary |
|---|---|
| public CorsConfiguration getCorsConfiguration(HttpServletRequest request) Implements org. Doc from org. Return a
| |
| getSockJsPath | back to summary |
|---|---|
| private String getSockJsPath(HttpServletRequest servletRequest) | |
| getSockJsService | back to summary |
|---|---|
| public SockJsService getSockJsService() Return the | |
| getWebSocketHandler | back to summary |
|---|---|
| public WebSocketHandler getWebSocketHandler() Return the | |
| handleRequest | back to summary |
|---|---|
| public void handleRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws ServletException, IOException Implements org. Doc from org. Process the given request, generating a response.
| |
| isRunning | back to summary |
|---|---|
| public boolean isRunning() Implements org. Doc from org. Check whether this component is currently running. In the case of a container, this will return
| |
| setServletContext | back to summary |
|---|---|
| public void setServletContext(ServletContext servletContext) Implements org. Doc from org. Set the Invoked after population of normal bean properties but before an init
callback like InitializingBean's
| |
| start | back to summary |
|---|---|
| public void start() Implements org. Doc from org. Start this component. Should not throw an exception if the component is already running. In the case of a container, this will propagate the start signal to all components that apply.
| |
| stop | back to summary |
|---|---|
| public void stop() Implements org. Doc from org. Stop this component, typically in a synchronous fashion, such that the component is
fully stopped upon return of this method. Consider implementing Note that this stop notification is not guaranteed to come before destruction:
On regular shutdown, Should not throw an exception if the component is not running (not started yet). In the case of a container, this will propagate the stop signal to all components that apply.
| |