java.lang.Object
jakarta.websocket.Endpoint
com.sun.faces.push.WebsocketEndpoint
This web socket server endpoint handles web socket requests coming from <f:websocket>
.
- Since:
- 2.3
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The context-relative URI template where the web socket endpoint should listen on. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onClose
(Session session, CloseReason reason) Remove given web socket session from theWebsocketSessionManager
.void
Delegate exception to onClose.void
onOpen
(Session session, EndpointConfig config) Add given web socket session to theWebocketSessionManager
.
-
Field Details
-
URI_TEMPLATE
The context-relative URI template where the web socket endpoint should listen on.- See Also:
-
-
Constructor Details
-
WebsocketEndpoint
public WebsocketEndpoint()
-
-
Method Details
-
onOpen
Add given web socket session to theWebocketSessionManager
. If web socket session is not accepted (i.e. the channel identifier is unknown), then immediately close with reasonVIOLATED_POLICY
(close code 1008). -
onError
-
onClose
Remove given web socket session from theWebsocketSessionManager
. If there is any exception from onError which was not caused by GOING_AWAY, then log it. Tomcat <= 8.0.30 is known to throw an unnecessary exception when client abruptly disconnects, see also issue 57489.
-