Package de.xima.fc.proma.provider
Class PromaResponse<T>
java.lang.Object
de.xima.fc.proma.provider.PromaResponse<T>
- Type Parameters:
T
- Type of the result.
- All Implemented Interfaces:
IPromaResponse<T>
POJO for
IPromaResponse
.- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> IPromaResponse<T>
empty
(int statusCode) static <T> IPromaResponse<T>
of
(int statusCode, T result) int
value()
-
Method Details
-
value
- Specified by:
value
in interfaceIPromaResponse<T>
- Returns:
- Transformed result of the response, usually from the HTTP response body.
-
statusCode
public int statusCode()- Specified by:
statusCode
in interfaceIPromaResponse<T>
- Returns:
- Status code of the HTTP response.
-
empty
- Type Parameters:
T
- Type of the result.- Parameters:
statusCode
- Status code of the HTTP response.- Returns:
- A new POJO with the given status code and a
null
result.
-
of
- Type Parameters:
T
- Type of the result.- Parameters:
statusCode
- Status code of the HTTP response.result
- Transformed result of the response, usually from the HTTP response body.- Returns:
- A new POJO with the given data.
-