Interface DelegatingResponseConverterFunctionProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A
ResponseConverterFunction
provider interface which provides a
ResponseConverterFunction
that converts an object of the given type to an HttpResponse
using the delegating ResponseConverterFunction
.
The delegating converter is a collection of several converters that you specify when
creating an annotated service and
Armeria default converters.-
Method Summary
Modifier and TypeMethodDescriptioncreateResponseConverterFunction
(Type responseType, ResponseConverterFunction responseConverter) Returns aResponseConverterFunction
instance if the function can convert theresponseType
, otherwise returnnull
.
-
Method Details
-
createResponseConverterFunction
@Nullable @Nullable ResponseConverterFunction createResponseConverterFunction(Type responseType, ResponseConverterFunction responseConverter) Returns aResponseConverterFunction
instance if the function can convert theresponseType
, otherwise returnnull
. TheResponseConverterFunction
passed in is a delegate function which will be used to convert theresponseType
.- Parameters:
responseType
- the returnType
of the annotated HTTP service methodresponseConverter
- the delegateResponseConverterFunction
which converts an object into anHttpResponse
-