Package io.goobi.viewer.websockets
Class CampaignEndpoint
java.lang.Object
io.goobi.viewer.websockets.CampaignEndpoint
Endpoint that maps HTTP session IDs to connected web sockets.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if the given http session id has a registered lockvoid
onClose
(javax.websocket.Session session) void
void
void
onOpen
(javax.websocket.Session session, javax.websocket.EndpointConfig config) static void
removeSessionLock
(String sessionId) Remove a registered crowdsourcing page lock after session end and notify the assiciated websocket session that the session has ended
-
Constructor Details
-
CampaignEndpoint
public CampaignEndpoint()
-
-
Method Details
-
onOpen
public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config) -
onMessage
- Throws:
IOException
DAOException
-
onClose
public void onClose(javax.websocket.Session session) -
onError
-
removeSessionLock
Remove a registered crowdsourcing page lock after session end and notify the assiciated websocket session that the session has ended- Parameters:
sessionId
-- Throws:
DAOException
IOException
-
hasLock
Checks if the given http session id has a registered lock- Parameters:
sessionId
-- Returns:
- true if given sesisonId has a registered lock; false otherwise
-