Interface ResponseConverterFunctionProvider
- All Known Implementing Classes:
ProtobufResponseConverterFunctionProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@UnstableApi @FunctionalInterface public interface ResponseConverterFunctionProvider
A
ResponseConverterFunction
provider interface which creates a new
ResponseConverterFunction
for converting an object of the given type and functions.-
Method Summary
Modifier and Type Method Description ResponseConverterFunction
createResponseConverterFunction(Type responseType, ResponseConverterFunction responseConverter, ExceptionHandlerFunction exceptionHandler)
Returns aResponseConverterFunction
instance if there is a function which can convert theresponseType
, otherwise returnnull
.
-
Method Details
-
createResponseConverterFunction
@Nullable ResponseConverterFunction createResponseConverterFunction(Type responseType, ResponseConverterFunction responseConverter, ExceptionHandlerFunction exceptionHandler)Returns aResponseConverterFunction
instance if there is a function which can convert theresponseType
, otherwise returnnull
. TheresponseConverter
andexceptionHandler
are originally configuredResponseConverterFunction
andExceptionHandlerFunction
which would be used if this provider returnsnull
.- Parameters:
responseType
- the returnType
of the annotated HTTP service methodresponseConverter
- theResponseConverterFunction
which converts an object into anHttpResponse
exceptionHandler
- theExceptionHandlerFunction
which converts aThrowable
into anHttpResponse
-