Class MCRProcessableWebsocketSenderImpl
java.lang.Object
org.mycore.webtools.processing.socket.impl.MCRProcessableWebsocketSenderImpl
- All Implemented Interfaces:
MCRProcessableWebsocketSender
public class MCRProcessableWebsocketSenderImpl
extends Object
implements MCRProcessableWebsocketSender
Websocket implementation of sending processable objects.
- Author:
- Matthias Eichner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollection
(jakarta.websocket.Session session, MCRProcessableRegistry registry, MCRProcessableCollection collection) Appends the given collection to the registry.void
addProcessable
(jakarta.websocket.Session session, MCRProcessableCollection collection, MCRProcessable processable) Appends the given processable to the collection.void
removeCollection
(jakarta.websocket.Session session, MCRProcessableCollection collection) Removes the given collection.void
removeProcessable
(jakarta.websocket.Session session, MCRProcessable processable) Removes the given processable.void
Sends an error code.void
sendRegistry
(jakarta.websocket.Session session, MCRProcessableRegistry registry) Sends the whole registry.void
updateProcessable
(jakarta.websocket.Session session, MCRProcessable processable) Updates the content of the given processable.protected void
updateProcessable
(jakarta.websocket.Session session, MCRProcessable processable, Integer processableId, Integer collectionId) void
updateProperty
(jakarta.websocket.Session session, MCRProcessableCollection collection, String name, Object value) Updates a property of the given processable collection.
-
Constructor Details
-
MCRProcessableWebsocketSenderImpl
public MCRProcessableWebsocketSenderImpl()
-
-
Method Details
-
sendError
Description copied from interface:MCRProcessableWebsocketSender
Sends an error code.- Specified by:
sendError
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessionerrorCode
- the error code
-
sendRegistry
Description copied from interface:MCRProcessableWebsocketSender
Sends the whole registry.- Specified by:
sendRegistry
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessionregistry
- the registry to send
-
addCollection
public void addCollection(jakarta.websocket.Session session, MCRProcessableRegistry registry, MCRProcessableCollection collection) Description copied from interface:MCRProcessableWebsocketSender
Appends the given collection to the registry.- Specified by:
addCollection
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessionregistry
- where to add the collectioncollection
- the collection to add
-
removeCollection
public void removeCollection(jakarta.websocket.Session session, MCRProcessableCollection collection) Description copied from interface:MCRProcessableWebsocketSender
Removes the given collection.- Specified by:
removeCollection
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessioncollection
- the collection to remove
-
addProcessable
public void addProcessable(jakarta.websocket.Session session, MCRProcessableCollection collection, MCRProcessable processable) Description copied from interface:MCRProcessableWebsocketSender
Appends the given processable to the collection.- Specified by:
addProcessable
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessioncollection
- where to add the processableprocessable
- the processable to add
-
updateProcessable
Description copied from interface:MCRProcessableWebsocketSender
Updates the content of the given processable.- Specified by:
updateProcessable
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessionprocessable
- the processable to update
-
updateProcessable
protected void updateProcessable(jakarta.websocket.Session session, MCRProcessable processable, Integer processableId, Integer collectionId) -
removeProcessable
Description copied from interface:MCRProcessableWebsocketSender
Removes the given processable.- Specified by:
removeProcessable
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessionprocessable
- the processable to remove
-
updateProperty
public void updateProperty(jakarta.websocket.Session session, MCRProcessableCollection collection, String name, Object value) Description copied from interface:MCRProcessableWebsocketSender
Updates a property of the given processable collection.- Specified by:
updateProperty
in interfaceMCRProcessableWebsocketSender
- Parameters:
session
- the websocket sessioncollection
- the collection to updatename
- name of the propertyvalue
- value of the property
-
getId
-
remove
-