Package io.goobi.viewer.websockets
Class ConfigEditorEndpoint
java.lang.Object
jakarta.websocket.Endpoint
io.goobi.viewer.websockets.ConfigEditorEndpoint
public class ConfigEditorEndpoint
extends jakarta.websocket.Endpoint
Endpoint for unlocking files opened in
AdminConfigEditorBean
when leaving a page-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onClose
(jakarta.websocket.Session session) Called when leaving a adminConfigEditor page.void
void
Accept messages containing a file path which is locked by the curren page and needs to be unlocked upon leaving the pagevoid
onOpen
(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig config) Store id of http sessionMethods inherited from class jakarta.websocket.Endpoint
onClose
-
Constructor Details
-
ConfigEditorEndpoint
public ConfigEditorEndpoint()
-
-
Method Details
-
onOpen
public void onOpen(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig config) Store id of http session- Specified by:
onOpen
in classjakarta.websocket.Endpoint
- Parameters:
session
-config
-
-
onMessage
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(jakarta.websocket.Session session) Called when leaving a adminConfigEditor page. Unlocks the file set byonMessage(String)
for the session set byonOpen(Session, EndpointConfig)
usingAdminConfigEditorBean.unlockFile(Path, String)
- Parameters:
session
-
-
onError
- Overrides:
onError
in classjakarta.websocket.Endpoint
-