Class CampaignEndpoint

java.lang.Object
io.goobi.viewer.websockets.CampaignEndpoint

public class CampaignEndpoint extends Object
Endpoint that maps HTTP session IDs to connected web sockets.
  • Constructor Details

    • CampaignEndpoint

      public CampaignEndpoint()
  • Method Details

    • onOpen

      public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
    • onMessage

      public void onMessage(String message) throws IOException, DAOException
      Throws:
      IOException
      DAOException
    • onClose

      public void onClose(javax.websocket.Session session)
    • onError

      public void onError(javax.websocket.Session session, Throwable t)
    • removeSessionLock

      public static void removeSessionLock(String sessionId) throws IOException
      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

      public static boolean hasLock(String sessionId)
      Checks if the given http session id has a registered lock
      Parameters:
      sessionId -
      Returns:
      true if given sesisonId has a registered lock; false otherwise