Interface RequestConverterFunction
-
- All Known Implementing Classes:
ByteArrayRequestConverterFunction
,JacksonRequestConverterFunction
,StringRequestConverterFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RequestConverterFunction
Converts anAggregatedHttpMessage
to an object. The class implementing this interface would be specified as a value of aRequestConverter
annotation.- See Also:
RequestConverter
,RequestObject
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
convertRequest(ServiceRequestContext ctx, AggregatedHttpMessage request, Class<?> expectedResultType)
Converts the specifiedrequest
to an object ofexpectedResultType
.static <T> T
fallthrough()
Throws aFallthroughException
in order to try to convert therequest
to an object by the next converter.
-
-
-
Method Detail
-
convertRequest
@Nullable Object convertRequest(ServiceRequestContext ctx, AggregatedHttpMessage request, Class<?> expectedResultType) throws Exception
Converts the specifiedrequest
to an object ofexpectedResultType
. Callsfallthrough()
or throws aFallthroughException
if this converter cannot convert therequest
to an object.- Throws:
Exception
-
fallthrough
static <T> T fallthrough()
Throws aFallthroughException
in order to try to convert therequest
to an object by the next converter.
-
-