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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    hasLock(String sessionId)
    Checks if the given http session id has a registered lock
    void
    onClose(jakarta.websocket.Session session)
     
    void
    onError(jakarta.websocket.Session session, Throwable t)
     
    void
    onMessage(String message)
     
    void
    onOpen(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig config)
     
    static void
    Remove a registered crowdsourcing page lock after session end and notify the assiciated websocket session that the session has ended

    Methods inherited from class jakarta.websocket.Endpoint

    onClose

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CampaignEndpoint

      public CampaignEndpoint()
  • Method Details

    • onOpen

      public void onOpen(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig config)
      Specified by:
      onOpen in class jakarta.websocket.Endpoint
    • onMessage

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

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

      public void onError(jakarta.websocket.Session session, Throwable t)
      Overrides:
      onError in class jakarta.websocket.Endpoint
    • 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