Modifier and Type | Field and Description |
---|---|
static String |
URI_TEMPLATE
The context-relative URI template where the web socket endpoint should listen on.
|
Constructor and Description |
---|
SocketEndpoint() |
Modifier and Type | Method and Description |
---|---|
void |
onClose(Session session,
CloseReason reason)
Remove given web socket session from the
SocketSessionManager . |
void |
onError(Session session,
Throwable throwable)
Delegate exception to onClose.
|
void |
onOpen(Session session,
EndpointConfig config)
Add given web socket session to the
SocketSessionManager . |
public static final String URI_TEMPLATE
public void onOpen(Session session, EndpointConfig config)
SocketSessionManager
. If web socket session is not accepted (i.e. the
channel identifier is unknown), then immediately close with reason VIOLATED_POLICY (close code 1008).public void onClose(Session session, CloseReason reason)
SocketSessionManager
. 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.Copyright © 2012–2017 OmniFaces. All rights reserved.