@FunctionalInterface public interface RequestConverterFunction
AggregatedHttpRequest to an object. The class implementing this interface would
be specified as a value of a RequestConverter annotation.RequestConverter,
RequestObject| Modifier and Type | Method and Description |
|---|---|
Object |
convertRequest(ServiceRequestContext ctx,
AggregatedHttpRequest request,
Class<?> expectedResultType)
Converts the specified
request to an object of expectedResultType. |
static <T> T |
fallthrough()
Throws a
FallthroughException in order to try to convert the request to
an object by the next converter. |
Object convertRequest(ServiceRequestContext ctx, AggregatedHttpRequest request, Class<?> expectedResultType) throws Exception
request to an object of expectedResultType.
Calls fallthrough() or throws a FallthroughException if
this converter cannot convert the request to an object.Exceptionstatic <T> T fallthrough()
FallthroughException in order to try to convert the request to
an object by the next converter.Copyright © 2020 LeanCloud. All rights reserved.