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) intvalue()
-
Method Details
-
value
- Specified by:
valuein interfaceIPromaResponse<T>- Returns:
- Transformed result of the response, usually from the HTTP response body.
-
statusCode
public int statusCode()- Specified by:
statusCodein 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
nullresult.
-
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.
-