Class CallContext

java.lang.Object
com.onlinepayments.CallContext

public class CallContext extends Object
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 Details

    • CallContext

      public CallContext()
  • Method Details

    • getIdempotenceKey

      public String getIdempotenceKey()
      Returns:
      The idempotence key.
    • withIdempotenceKey

      public CallContext withIdempotenceKey(String idempotenceKey)
      Sets the idempotence key to use for the next request for which this call context is used.
      Returns:
      This call context object.
    • getIdempotenceRequestTimestamp

      public Long getIdempotenceRequestTimestamp()
      Returns:
      The idempotence request timestamp from the response to the last request for which this call context was used, or null if no idempotence request timestamp was present.
    • setIdempotenceRequestTimestamp

      public void setIdempotenceRequestTimestamp(Long idempotenceRequestTimestamp)
      Sets the idempotence request timestamp. This method should only be called by Communicator objects based on the response to the request for which this call context was used.
    • getIdempotenceResponseDateTime

      public ZonedDateTime getIdempotenceResponseDateTime()
      Returns:
      The idempotence response date/time from the response to the last request for which this call context was used, or null if no idempotence response date/time was present.
    • setIdempotenceResponseDateTime

      public void setIdempotenceResponseDateTime(ZonedDateTime idempotenceResponseDateTime)
      Sets the idempotence response date/time. This method should only be called by Communicator objects based on the response to the request for which this call context was used.