Interface MCRProcessableWebsocketSender
- All Known Implementing Classes:
MCRProcessableWebsocketSenderImpl
public interface MCRProcessableWebsocketSender
Base interface to send processables, collections and the registry over the wire.
- Author:
- Matthias Eichner
-
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.void
updateProperty
(jakarta.websocket.Session session, MCRProcessableCollection collection, String name, Object value) Updates a property of the given processable collection.
-
Method Details
-
sendError
Sends an error code.- Parameters:
session
- the websocket sessionerrorCode
- the error code
-
sendRegistry
Sends the whole registry.- Parameters:
session
- the websocket sessionregistry
- the registry to send
-
addCollection
void addCollection(jakarta.websocket.Session session, MCRProcessableRegistry registry, MCRProcessableCollection collection) Appends the given collection to the registry.- Parameters:
session
- the websocket sessionregistry
- where to add the collectioncollection
- the collection to add
-
removeCollection
Removes the given collection.- Parameters:
session
- the websocket sessioncollection
- the collection to remove
-
addProcessable
void addProcessable(jakarta.websocket.Session session, MCRProcessableCollection collection, MCRProcessable processable) Appends the given processable to the collection.- Parameters:
session
- the websocket sessioncollection
- where to add the processableprocessable
- the processable to add
-
removeProcessable
Removes the given processable.- Parameters:
session
- the websocket sessionprocessable
- the processable to remove
-
updateProcessable
Updates the content of the given processable.- Parameters:
session
- the websocket sessionprocessable
- the processable to update
-
updateProperty
void updateProperty(jakarta.websocket.Session session, MCRProcessableCollection collection, String name, Object value) Updates a property of the given processable collection.- Parameters:
session
- the websocket sessioncollection
- the collection to updatename
- name of the propertyvalue
- value of the property
-