Package io.goobi.viewer.websockets
Class CampaignEndpoint
java.lang.Object
jakarta.websocket.Endpoint
io.goobi.viewer.websockets.CampaignEndpoint
public class CampaignEndpoint
extends jakarta.websocket.Endpoint
Endpoint that maps HTTP session IDs to connected web sockets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if the given http session id has a registered lockvoid
onClose
(jakarta.websocket.Session session) void
void
void
onOpen
(jakarta.websocket.Session session, jakarta.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 endedMethods inherited from class jakarta.websocket.Endpoint
onClose
-
Constructor Details
-
CampaignEndpoint
public CampaignEndpoint()
-
-
Method Details
-
onOpen
public void onOpen(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig config) - Specified by:
onOpen
in classjakarta.websocket.Endpoint
-
onMessage
- Throws:
IOException
DAOException
-
onClose
public void onClose(jakarta.websocket.Session session) -
onError
- Overrides:
onError
in classjakarta.websocket.Endpoint
-
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
-