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 overlayed with this interface.booleanvoidsetException(ServiceException exception) Sets theServiceExceptionthat was thrown while handling the message.voidsetResult(boolean acknowledge) Determines whether the message should be acknowledged or not.Methods 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 overlayed 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.
-
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.
-