Class JSONResponseImpl

java.lang.Object
se.liu.ida.hefquin.engine.federation.access.impl.response.DataRetrievalResponseBase<org.apache.jena.atlas.json.JsonObject>
se.liu.ida.hefquin.engine.federation.access.impl.response.JSONResponseImpl
All Implemented Interfaces:
DataRetrievalResponse<org.apache.jena.atlas.json.JsonObject>, JSONResponse

public class JSONResponseImpl extends DataRetrievalResponseBase<org.apache.jena.atlas.json.JsonObject> implements JSONResponse
  • Constructor Details

    • JSONResponseImpl

      public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, FederationMember fm, DataRetrievalRequest request, Date requestStartTime)
      Constructs a response with the given JSON object, federation member, request, 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:
      jsonObject - the JSON object contained in this response (must not be null)
      fm - the federation member from which this response originates (must not be null)
      request - the data retrieval request associated with this response (must not be null)
      requestStartTime - the time at which the request was initiated (must not be null)
    • JSONResponseImpl

      public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime)
      Constructs a response with the given JSON object, federation member, request, request start time, and retrieval end time. This constructor assumes no error occurred.
      Parameters:
      jsonObject - the JSON object contained in this response (must not be null)
      fm - the federation member from which this response originates (must not be null)
      request - the data retrieval request associated with 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)
    • JSONResponseImpl

      public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Integer errorStatusCode, String errorDescription)
      Constructs a response with the given JSON object, federation member, request, request start time, and error details. The retrieval end time is automatically set to the current time at the moment of construction.
      Parameters:
      jsonObject - the JSON object contained in this response (must not be null)
      fm - the federation member from which this response originates (must not be null)
      request - the data retrieval request associated with 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
    • JSONResponseImpl

      public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription)
      Constructs a response with the given JSON object, federation member, request, request start time, retireval end time, and error details.
      Parameters:
      jsonObject - the JSON object contained in this response (must not be null)
      fm - the federation member from which this response originates (must not be null)
      request - the data retrieval request associated with 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