SimpleUrlHandlerMapping with support for more
precise mapping of WebSocket handshake requests to handlers of type
WebSocketHttpRequestHandler. Also delegates Lifecycle
methods to handlers in the getUrlMap() that implement it.
| Modifier and Type | Field and Description |
|---|---|
| private Integer | |
| private volatile boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | getHandlerInternal(HttpServletRequest
current HTTP request request)Overrides org. Look up a handler for the URL path of the given request. |
| public int | getPhase()
Overrides default org. Return the phase that this lifecycle object is supposed to run in. The default implementation returns |
| protected void | initServletContext(ServletContext
the ServletContext that this application object runs in
(never servletContext)null)Overrides org. Subclasses may override this for custom initialization based on the ServletContext that this application object runs in. The default implementation is empty. |
| public boolean | isRunning()
Implements org. Check whether this component is currently running. |
| private boolean | |
| public void | setPhase(int phase)
Set the phase that this handler should run in. By default, this is |
| public void | setWebSocketUpgradeMatch(boolean
whether to enable matching on match)"Upgrade: websocket"When this is set, if the matched handler is
|
| 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. |
| phase | back to summary |
|---|---|
| private Integer phase
| |
| running | back to summary |
|---|---|
| private volatile boolean running | |
| webSocketUpgradeMatch | back to summary |
|---|---|
| private boolean webSocketUpgradeMatch | |
| WebSocketHandlerMapping | back to summary |
|---|---|
| public WebSocketHandlerMapping() | |
| getHandlerInternal | back to summary |
|---|---|
| protected Object getHandlerInternal(HttpServletRequest request) throws Exception Overrides org. Doc from org. Look up a handler for the URL path of the given request.
| |
| getPhase | back to summary |
|---|---|
| public int getPhase() Overrides default org. Doc from org. Return the phase that this lifecycle object is supposed to run in. The default implementation returns
| |
| initServletContext | back to summary |
|---|---|
| protected void initServletContext(ServletContext servletContext) Overrides org. Doc from org. Subclasses may override this for custom initialization based on the ServletContext that this application object runs in. The default implementation is empty. Called by
| |
| 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
| |
| matchWebSocketUpgrade | back to summary |
|---|---|
| private boolean matchWebSocketUpgrade(Object handler, HttpServletRequest request) | |
| setPhase | back to summary |
|---|---|
| public void setPhase(int phase) Set the phase that this handler should run in. By default, this is
| |
| setWebSocketUpgradeMatch | back to summary |
|---|---|
| public void setWebSocketUpgradeMatch(boolean match) When this is set, if the matched handler is
| |
| 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.
| |