Class IdentityResponseFactory
java.lang.Object
io.github.grumpystuff.grumpyrest.response.standard.IdentityResponseFactory
- All Implemented Interfaces:
ResponseFactory
This simply accepts response values that implement
Response themselves and returns them unchanged. Without
this factory, a handler could not return such a response object.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateResponse(RequestCycle requestCycle, Object value) Creates aResponsefrom the specified response value.
-
Constructor Details
-
IdentityResponseFactory
public IdentityResponseFactory()Constructor.
-
-
Method Details
-
createResponse
Description copied from interface:ResponseFactoryCreates aResponsefrom the specified response value.Each factory only supports a specific set of response values. This method returns null if the response value is not supported, causing the next factory to be tried.
- Specified by:
createResponsein interfaceResponseFactory- Parameters:
requestCycle- the request cycle to create a response for. This is passed in case the response factory wants to do special stuff like look into request properties.value- the response value to convert to aResponse. May be null if the handler returned null.- Returns:
- the response or null
-