Class CardinalityResponseImpl

java.lang.Object
se.liu.ida.hefquin.federation.access.impl.response.DataRetrievalResponseBase<Integer>
se.liu.ida.hefquin.federation.access.impl.response.CardinalityResponseImpl
All Implemented Interfaces:
CardinalityResponse, DataRetrievalResponse<Integer>
Direct Known Subclasses:
CardinalityResponseImplWithoutCardinality

public class CardinalityResponseImpl extends DataRetrievalResponseBase<Integer> implements CardinalityResponse
  • Constructor Details

    • CardinalityResponseImpl

      public CardinalityResponseImpl(int cardinality, Date requestStartTime)
      Constructs a response with the given cardinality and request start time. The retrieval end time is automatically set to the current time at the moment of construction. This constructor assumes no error occurred.
      Parameters:
      cardinality - the data contained in this response (must not be null)
      requestStartTime - the time at which the request was initiated (must not be null)
    • CardinalityResponseImpl

      public CardinalityResponseImpl(int cardinality, Date requestStartTime, Date retrievalEndTime)
      Constructs a response with the given cardinality, request start time, and request end time. This constructor assumes no error occurred.
      Parameters:
      cardinality - the data contained in this response (must not be null)
      requestStartTime - the time at which the request was initiated (must not be null)
      retrievalEndTime - the time at which the retrieval of this response was completed (must not be null)
    • CardinalityResponseImpl

      public CardinalityResponseImpl(int cardinality, Date requestStartTime, Integer errorStatusCode, String errorDescription)
      Constructs a response with the given cardinality, request start time, and error details. The retrieval end time is automatically set to the current time at the moment of construction.
      Parameters:
      cardinality - the data contained in this response (must not be null)
      requestStartTime - the time at which the request was initiated (must not be null)
      errorStatusCode - the HTTP status code representing an error, or null if no error occurred
      errorDescription - a short description of the error, or null if no error occurred
    • CardinalityResponseImpl

      public CardinalityResponseImpl(int cardinality, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription)
      Constructs a response with the given cardinality, request start time, retrieval end time, and error details.
      Parameters:
      cardinality - the data contained in this response (must not be null)
      requestStartTime - the time at which the request was initiated (must not be null)
      retrievalEndTime - the time at which the retrieval of this response was completed (must not be null)
      errorStatusCode - the HTTP status code representing an error, or null if no error occurred
      errorDescription - a short description of the error, or null if no error occurred