Class DataRetrievalResponseBase<T>
java.lang.Object
se.liu.ida.hefquin.engine.federation.access.impl.response.DataRetrievalResponseBase<T>
- All Implemented Interfaces:
DataRetrievalResponse<T>
- Direct Known Subclasses:
CachedCardinalityResponseImpl
,JSONResponseImpl
,RecordsResponseImpl
,SolMapsResponseImpl
,StringResponseImpl
,TPFResponseImpl
,TriplesResponseImpl
public abstract class DataRetrievalResponseBase<T>
extends Object
implements DataRetrievalResponse<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DataRetrievalResponseBase
(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime) Constructs a response with the given data, federation member, request, and request start time.protected
DataRetrievalResponseBase
(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given data, federation member, request, request start time, and error details.protected
DataRetrievalResponseBase
(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given data, federation member, request, request start time, and request end time.protected
DataRetrievalResponseBase
(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given data, federation member, request, request start time, retrieval end time, and error details. -
Method Summary
Modifier and TypeMethodDescriptionReturns a short textual description of the error, if available.Returns the HTTP status code associated with an error, if any.Returns the federation member from which this response originates.Returns the data retrieval request that led to this response.Returns the timestamp indicating when the data retrieval request was initiated.Returns a short textual description of the error, if available.Returns the timestamp indicating when the data retrieval was completed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.liu.ida.hefquin.engine.federation.access.DataRetrievalResponse
getRequestDuration, isError
-
Field Details
-
data
-
errorStatusCode
-
errorDescription
-
-
Constructor Details
-
DataRetrievalResponseBase
protected DataRetrievalResponseBase(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime) Constructs a response with the given data, 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:
data
- the data contained in this response (must not benull
)fm
- the federation member from which this response originates (must not benull
)request
- the request associated with this response (must not benull
)requestStartTime
- the time at which the request was initiated (must not benull
)
-
DataRetrievalResponseBase
protected DataRetrievalResponseBase(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given data, federation member, request, request start time, and request end time. This constructor assumes no error occurred.- Parameters:
data
- the data contained in this response (must not benull
)fm
- the federation member from which this response originates (must not benull
)request
- the request associated with 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
)
-
DataRetrievalResponseBase
protected DataRetrievalResponseBase(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given data, 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:
data
- the data contained in this response (must not benull
)fm
- the federation member from which this response originates (must not benull
)request
- the request associated with 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, ornull
if no error occurrederrorDescription
- a short description of the error, ornull
if no error occurred
-
DataRetrievalResponseBase
protected DataRetrievalResponseBase(T data, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given data, federation member, request, request start time, retrieval end time, and error details.- Parameters:
data
- the data contained in this response (must not benull
)fm
- the federation member from which this response originates (must not benull
)request
- the request associated with 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, ornull
if no error occurrederrorDescription
- a short description of the error, ornull
if no error occurred
-
-
Method Details
-
getFederationMember
Returns the federation member from which this response originates.- Specified by:
getFederationMember
in interfaceDataRetrievalResponse<T>
- Returns:
- the corresponding federation member
-
getRequest
Returns the data retrieval request that led to this response.- Specified by:
getRequest
in interfaceDataRetrievalResponse<T>
- Returns:
- the associated data retrieval request
-
getRequestStartTime
Returns the timestamp indicating when the data retrieval request was initiated.- Specified by:
getRequestStartTime
in interfaceDataRetrievalResponse<T>
- Returns:
- the request start time
-
getRetrievalEndTime
Returns the timestamp indicating when the data retrieval was completed.- Specified by:
getRetrievalEndTime
in interfaceDataRetrievalResponse<T>
- Returns:
- the retrieval end time
-
getErrorStatusCode
Returns the HTTP status code associated with an error, if any.- Specified by:
getErrorStatusCode
in interfaceDataRetrievalResponse<T>
- Returns:
- the error status code, or
null
if no error occurred
-
getErrorDescription
Returns a short textual description of the error, if available.- Specified by:
getErrorDescription
in interfaceDataRetrievalResponse<T>
- Returns:
- the error description, or
null
if no error occurred
-
getResponseData
Returns a short textual description of the error, if available.- Specified by:
getResponseData
in interfaceDataRetrievalResponse<T>
- Returns:
- the error description, or
null
if no error occurred - Throws:
UnsupportedOperationDueToRetrievalError
-