Package com.sap.cds.services.outbox
Interface OutboxMessage
public interface OutboxMessage
extends com.sap.cds.CdsData
Represents the default structure of a message stored in the outbox and handled generically.
Additional information can be freely added to the underlying
Map structure.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sap.cds.CdsData
com.sap.cds.CdsData.Factory -
Field Summary
FieldsFields inherited from interface com.sap.cds.CdsData
factory -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboxMessagecreate()Creates a newOutboxMessagegetEvent()voidSets the name of the entity that the event is related tovoidSets the original event, to be stored in the outboxvoidSets the event context parameters of the original eventvoidsetStoredRequestContext(StoredRequestContext storedRequestContext) Sets the request context information, to be stored in the outbox.Methods inherited from interface com.sap.cds.CdsData
containsPath, forRemoval, forRemoval, get, getMetadata, getPath, getPathOrDefault, isForRemoval, putMetadata, putPath, putPathIfAbsent, removePathMethods inherited from interface com.sap.cds.JSONizable
toJsonMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
EVENT
- See Also:
-
PARAMS
- See Also:
-
-
Method Details
-
create
Creates a newOutboxMessage- Returns:
- the
OutboxMessage
-
getEvent
String getEvent()- Returns:
- the original event stored in the outbox
-
setEvent
Sets the original event, to be stored in the outbox- Parameters:
event- the event
-
getEntity
String getEntity()- Returns:
- the name of the entity that the event is related to
-
setEntity
Sets the name of the entity that the event is related to- Parameters:
entity- the entity name
-
getParams
- Returns:
- the event context parameters of the original event
-
setParams
Sets the event context parameters of the original event- Parameters:
data- the context parameters
-
getStoredRequestContext
StoredRequestContext getStoredRequestContext()- Returns:
- the request context information stored in the outbox
-
setStoredRequestContext
Sets the request context information, to be stored in the outbox. The values stored in this map are used to restore the request context when the outbox message is published.- Parameters:
storedRequestContext- the request context information to be stored in the outbox
-