@FunctionalInterface public static interface RestHandlerFactory.JsonRestHandlerFunction
JsonRestHandler
.Modifier and Type | Method and Description |
---|---|
com.google.gson.JsonElement |
handle(List<org.apache.http.Header> headers,
List<org.apache.http.NameValuePair> params,
com.google.gson.JsonElement content)
The handling function of
JsonRestHandler . |
@Nullable com.google.gson.JsonElement handle(@Nonnull List<org.apache.http.Header> headers, @Nonnull List<org.apache.http.NameValuePair> params, @Nullable com.google.gson.JsonElement content) throws RestHandlerException
JsonRestHandler
.
This method has the same signature as JsonRestHandler.handleParsedContent(List, List, JsonElement)
, and can be used in RestHandlerFactory.createJsonRestHandler(JsonRestHandlerFunction)
to set its behavior.
headers
- the HTTP headers of the received requestparams
- the request parameterscontent
- the JsonElement
representing the content of the HTTP requestJsonElement
containing the endpoint response, or null
RestHandlerException
- if an error occurred when handling the requestRestHandlerFactory.createJsonRestHandler(JsonRestHandlerFunction)
Copyright © 2020 SOM Research Lab. All rights reserved.