public interface ExternalCallService
Modifier and Type | Method and Description |
---|---|
void |
complete(ExternalCall externalCall)
Marks the external call as a successfully executed call.
|
void |
failed(ExternalCall externalCall)
Marks the external call as an unsuccessfully executed call.
|
ExternalCall |
prepare(String operationUri,
String operationKey,
Message message)
Prepares a new external call for the specified unique operation invocation.
|
ExternalCall prepare(String operationUri, String operationKey, Message message)
The attempted external call might not be allowed.
This could happen if the external call is either duplicate or outdated.
To verify it's a new call, the provided Message.getMsgTimestamp()
will be compared with an existing known one (if any) for this invocation:
if the provided timestamp is newer, the call is considered new,
otherwise the call is considered outdated or duplicate.
operationUri
- the operation URI that the external call is done viaoperationKey
- the operation key that is to be unique for this operation URI
(object ID for edits, correlation ID for single-entity creation messages, etc.)message
- the message with the correct msg timestampExternalCall
, if the attempted call is new and is prepared to be made;
null if the call is duplicate or outdated and should NOT be madeLockFailureException
- if the requested call is currently in the processing state
and therefore is temporarily not allowed to be repeatedvoid complete(ExternalCall externalCall)
externalCall
- the external call to be finalized.void failed(ExternalCall externalCall)
externalCall
- the external call to be finalized.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.