Package de.xima.fc.servlet.presence
Class PresenceBarEndpoint
- java.lang.Object
-
- de.xima.fc.servlet.presence.PresenceBarEndpoint
-
public class PresenceBarEndpoint extends Object
WebSocket endpoint for the presence bar. It authenticates new connections and subscribes them to the requestedFORM_RECORD's presence bar updates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPresenceBarEndpoint.ConfiguratorConfigurator for thePresenceBarEndpointthat extracts the HTTP session and form request ID from the handshake request and stores data in the endpoint's user properties.
-
Constructor Summary
Constructors Constructor Description PresenceBarEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonClose(javax.websocket.Session wsSession, javax.websocket.CloseReason reason)Removes the session from the presence registry once the connection closes.voidonError(javax.websocket.Session wsSession, Throwable error)Logs a WebSocket transport error, removes the subscription and closes the connection if it is still open.voidonOpen(javax.websocket.Session wsSession, javax.websocket.EndpointConfig config)Authenticates a new WebSocket connection and, once valid, subscribes it to the requested form record presence bar updates.voidonPong(javax.websocket.Session wsSession, javax.websocket.PongMessage pong)Acknowledges the connection's outstanding ping without inspecting the pong payload.
-
-
-
Method Detail
-
onOpen
public void onOpen(javax.websocket.Session wsSession, javax.websocket.EndpointConfig config)Authenticates a new WebSocket connection and, once valid, subscribes it to the requested form record presence bar updates.- Parameters:
wsSession- The newly opened WebSocket session.config- The endpoint configuration, carrying the HTTP session set byPresenceBarEndpoint.Configurator.
-
onPong
public void onPong(javax.websocket.Session wsSession, javax.websocket.PongMessage pong)Acknowledges the connection's outstanding ping without inspecting the pong payload.- Parameters:
wsSession- the WebSocket session that received the pongpong- the received pong control frame- Since:
- 8.6.0
-
onClose
public void onClose(javax.websocket.Session wsSession, javax.websocket.CloseReason reason)Removes the session from the presence registry once the connection closes.- Parameters:
wsSession- The WebSocket session that closed.reason- Why the session closed.
-
onError
public void onError(javax.websocket.Session wsSession, Throwable error)Logs a WebSocket transport error, removes the subscription and closes the connection if it is still open.- Parameters:
wsSession- The WebSocket session the error occurred on, ornull.error- The error that occurred, ornull.
-
-