Package com.onlinepayments
Class CallContext
java.lang.Object
com.onlinepayments.CallContext
A call context can be used to send extra information with a request, and to receive extra information from a response.
Please note that this class is not thread-safe. Each request should get its own call context instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetIdempotenceRequestTimestamp(Long idempotenceRequestTimestamp) Sets the idempotence request timestamp.voidsetIdempotenceResponseDateTime(ZonedDateTime idempotenceResponseDateTime) Sets the idempotence response date/time.withIdempotenceKey(String idempotenceKey) Sets the idempotence key to use for the next request for which this call context is used.
-
Constructor Details
-
CallContext
public CallContext()
-
-
Method Details
-
getIdempotenceKey
- Returns:
- The idempotence key.
-
withIdempotenceKey
Sets the idempotence key to use for the next request for which this call context is used.- Returns:
- This call context object.
-
getIdempotenceRequestTimestamp
- Returns:
- The idempotence request timestamp from the response to the last request for which this call context was used,
or
nullif no idempotence request timestamp was present.
-
setIdempotenceRequestTimestamp
Sets the idempotence request timestamp. This method should only be called byCommunicatorobjects based on the response to the request for which this call context was used. -
getIdempotenceResponseDateTime
- Returns:
- The idempotence response date/time from the response to the last request for which this call context was used,
or
nullif no idempotence response date/time was present.
-
setIdempotenceResponseDateTime
Sets the idempotence response date/time. This method should only be called byCommunicatorobjects based on the response to the request for which this call context was used.
-