Class ConfigEditorEndpoint

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

public class ConfigEditorEndpoint extends Object
Endpoint for unlocking files opened in AdminConfigEditorBean when leaving a page
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onClose(javax.websocket.Session session)
    Called when leaving a adminConfigEditor page.
    void
    onError(javax.websocket.Session session, Throwable t)
     
    void
    onMessage(String message)
    Accept messages containing a file path which is locked by the curren page and needs to be unlocked upon leaving the page
    void
    onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
    Store id of http session

    Methods inherited from class java.lang.Object

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

    • ConfigEditorEndpoint

      public ConfigEditorEndpoint()
  • Method Details

    • onOpen

      public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
      Store id of http session
      Parameters:
      session -
      config -
    • onMessage

      public void onMessage(String message)
      Accept messages containing a file path which is locked by the curren page and needs to be unlocked upon leaving the page
      Parameters:
      message - a json object string in the form "{'fileToLock' : '/path/to/config/file'}"
    • onClose

      public void onClose(javax.websocket.Session session)
      Called when leaving a adminConfigEditor page. Unlocks the file set by onMessage(String) for the session set by onOpen(Session, EndpointConfig) using AdminConfigEditorBean.unlockFile(Path, String)
      Parameters:
      session -
    • onError

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