public final class JacksonRequestConverterFunction extends Object implements RequestConverterFunction
RequestConverterFunction which converts a JSON body of
the AggregatedHttpRequest to an object by ObjectMapper.| Constructor and Description |
|---|
JacksonRequestConverterFunction()
Creates an instance with the default
ObjectMapper. |
JacksonRequestConverterFunction(com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates an instance with the specified
ObjectMapper. |
| Modifier and Type | Method and Description |
|---|---|
Object |
convertRequest(ServiceRequestContext ctx,
AggregatedHttpRequest request,
Class<?> expectedResultType)
Converts the specified
AggregatedHttpRequest to an object of expectedResultType. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfallthroughpublic JacksonRequestConverterFunction()
ObjectMapper.public JacksonRequestConverterFunction(com.fasterxml.jackson.databind.ObjectMapper mapper)
ObjectMapper.public Object convertRequest(ServiceRequestContext ctx, AggregatedHttpRequest request, Class<?> expectedResultType) throws Exception
AggregatedHttpRequest to an object of expectedResultType.convertRequest in interface RequestConverterFunctionExceptionCopyright © 2020 LeanCloud. All rights reserved.