Package com.sap.cds.services.messaging
Interface MessagingErrorEventContext
- All Superinterfaces:
EventContext
EventContext for the event MessagingService.EVENT_MESSAGING_ERROR, that allows to
handle acknowledgement of a message on the messaging channel-
Method Summary
Modifier and TypeMethodDescriptionstatic MessagingErrorEventContextcreate()Creates anEventContextalready overlaid with this interface.booleanvoidsetException(ServiceException exception) Sets theServiceExceptionthat was thrown while handling the message.voidsetMessageData(Map<String, Object> data) Sets the message data of the received messagevoidsetMessageHeaders(Map<String, Object> headers) Sets the headers of the received messagevoidsetResult(boolean acknowledge) Determines whether the message should be acknowledged or not.voidSets the tenant of the received messageMethods 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 anEventContextalready overlaid with this interface. The event is set to beMessagingService.EVENT_MESSAGING_ERROR- Returns:
- the
MessagingErrorEventContext
-
setException
Sets theServiceExceptionthat was thrown while handling the message.- Parameters:
exception- theServiceExceptionthat was thrown while handling the message.
-
getException
ServiceException getException()- Returns:
- the
ServiceExceptionthat caused the error during the message handling.
-
setTenant
Sets the tenant of the received message- Parameters:
tenant-
-
getTenant
String getTenant()- Returns:
- the tenant of the received message
-
setMessageHeaders
Sets the headers of the received message- Parameters:
headers-
-
getMessageHeaders
- Returns:
- the headers of the received message
-
setMessageData
Sets the message data of the received message- Parameters:
data- message data
-
getMessageData
- Returns:
- the message data of the received message
-
setResult
void setResult(boolean acknowledge) Determines whether the message should be acknowledged or not.- Parameters:
acknowledge-trueif the message should be acknowledged on the messaging channel andfalseotherwise.
-
getResult
boolean getResult()- Returns:
trueif the message should be acknowledged on the messaging channel andfalseotherwise.
-