Package com.sap.cds.services.messaging
Interface TopicMessageEventContext
- All Superinterfaces:
EventContext
Describes the topic message of the
MessagingService-
Method Summary
Modifier and TypeMethodDescriptionstatic TopicMessageEventContextCreates a newTopicMessageEventContextReturns the data map.Returns the headers map.Returns the inbound flagReturns the message ID usually generated by the message brokervoidsetDataMap(Map<String, Object> data) Sets the data map.voidsetHeadersMap(Map<String, Object> headers) Sets the headers map.voidsetIsInbound(boolean inbound) Sets the inbound flagvoidsetMessageId(String id) Sets the message IDMethods inherited from interface com.sap.cds.services.EventContext
as, get, getAuthenticationInfo, getCdsRuntime, getChangeSetContext, getEvent, getFeatureTogglesInfo, getMessages, getModel, getParameterInfo, getService, getServiceCatalog, getTarget, getUserInfo, isCompleted, keySet, proceed, put, setCompleted
-
Method Details
-
create
Creates a newTopicMessageEventContext- Parameters:
topic- destination topic- Returns:
- the
TopicMessageEventContext
-
getIsInbound
Boolean getIsInbound()Returns the inbound flag- Returns:
- true, if the message has been received from a message broker or false, if it emitted to a message broker.
-
setIsInbound
void setIsInbound(boolean inbound) Sets the inbound flag- Parameters:
inbound- true, if the message has been received from a message broker or false, if it emitted to a message broker.
-
getDataMap
Returns the data map. In case of a cloudevents message the data map corresponds to the map, available under the "data" key.- Returns:
- the data map
-
setDataMap
Sets the data map. In case of a cloudevents message the data map corresponds to the map, available under the "data" key.- Parameters:
data- the data map
-
getHeadersMap
Returns the headers map. In case of a cloudevents message the headers map contains all properties of the message, except for "data".- Returns:
- the header map
-
setHeadersMap
Sets the headers map. In case of a cloudevents message the headers map contains all properties of the message, except for "data".- Parameters:
headers- the header data as a map
-
getMessageId
String getMessageId()Returns the message ID usually generated by the message broker- Returns:
- the message ID usually generated by the message broker
-
setMessageId
Sets the message ID- Parameters:
id- the message ID
-