Class JSONResponseImpl
java.lang.Object
se.liu.ida.hefquin.federation.access.impl.response.DataRetrievalResponseBase<org.apache.jena.atlas.json.JsonObject>
se.liu.ida.hefquin.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
-
Field Summary
Fields inherited from class se.liu.ida.hefquin.federation.access.impl.response.DataRetrievalResponseBase
data, errorDescription, errorStatusCode -
Constructor Summary
ConstructorsConstructorDescriptionJSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime) Constructs a response with the given JSON object and request start time.JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given JSON object, request start time, and error details.JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given JSON object, request start time, and retrieval end time.JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given JSON object, request start time, retrieval end time, and error details. -
Method Summary
Methods inherited from class se.liu.ida.hefquin.federation.access.impl.response.DataRetrievalResponseBase
getErrorDescription, getErrorStatusCode, getRequestStartTime, getResponseData, getRetrievalEndTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.federation.access.DataRetrievalResponse
getErrorDescription, getErrorStatusCode, getRequestDuration, getRequestStartTime, getResponseData, getRetrievalEndTime, isError
-
Constructor Details
-
JSONResponseImpl
Constructs a response with the given JSON object 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 benull)requestStartTime- the time at which the request was initiated (must not benull)
-
JSONResponseImpl
public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given JSON object, request start time, and retrieval end time. This constructor assumes no error occurred.- Parameters:
jsonObject- the JSON object contained in this response (must not benull)requestStartTime- the time at which the request was initiated (must not benull)retrievalEndTime- the time at which the retrieval of this response was completed (must not benull)
-
JSONResponseImpl
public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given JSON object, 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 benull)requestStartTime- the time at which the request was initiated (must not benull)errorStatusCode- the HTTP status code representing an error, ornullif no error occurrederrorDescription- a short description of the error, ornullif no error occurred
-
JSONResponseImpl
public JSONResponseImpl(org.apache.jena.atlas.json.JsonObject jsonObject, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given JSON object, request start time, retrieval end time, and error details.- Parameters:
jsonObject- the JSON object contained in this response (must not benull)requestStartTime- the time at which the request was initiated (must not benull)retrievalEndTime- the time at which the retrieval of this response was completed (must not benull)errorStatusCode- the HTTP status code representing an error, ornullif no error occurrederrorDescription- a short description of the error, ornullif no error occurred
-