Class ProtobufResponseConverterFunctionProvider
java.lang.Object
com.linecorp.armeria.server.protobuf.ProtobufResponseConverterFunctionProvider
- All Implemented Interfaces:
ResponseConverterFunctionProvider
@UnstableApi public final class ProtobufResponseConverterFunctionProvider extends Object implements ResponseConverterFunctionProvider
Provides a
ProtobufResponseConverterFunction
to annotated services.-
Constructor Summary
Constructors Constructor Description ProtobufResponseConverterFunctionProvider()
-
Method Summary
Modifier and Type Method Description ResponseConverterFunction
createResponseConverterFunction(Type returnType, ResponseConverterFunction responseConverter, ExceptionHandlerFunction exceptionHandler)
Returns aResponseConverterFunction
instance if there is a function which can convert theresponseType
, otherwise returnnull
.
-
Constructor Details
-
ProtobufResponseConverterFunctionProvider
public ProtobufResponseConverterFunctionProvider()
-
-
Method Details
-
createResponseConverterFunction
public ResponseConverterFunction createResponseConverterFunction(Type returnType, ResponseConverterFunction responseConverter, ExceptionHandlerFunction exceptionHandler)Description copied from interface:ResponseConverterFunctionProvider
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
.- Specified by:
createResponseConverterFunction
in interfaceResponseConverterFunctionProvider
- Parameters:
returnType
- the returnType
of the annotated HTTP service methodresponseConverter
- theResponseConverterFunction
which converts an object into anHttpResponse
exceptionHandler
- theExceptionHandlerFunction
which converts aThrowable
into anHttpResponse
-