Package com.linecorp.armeria.server.grpc
Class HttpJsonTranscodingOptionsBuilder
java.lang.Object
com.linecorp.armeria.server.grpc.HttpJsonTranscodingOptionsBuilder
A builder for
HttpJsonTranscodingOptions
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly createdHttpJsonTranscodingOptions
.errorHandler
(UnframedGrpcErrorHandler errorHandler) Sets an error handler which handles an exception raised while serving a gRPC request transcoded from an HTTP/JSON request.queryParamMatchRules
(HttpJsonTranscodingQueryParamMatchRule... queryParamMatchRules) Adds the specifiedHttpJsonTranscodingQueryParamMatchRule
which is used to matchQueryParams
of anHttpRequest
with fields in aMessage
.queryParamMatchRules
(Iterable<HttpJsonTranscodingQueryParamMatchRule> queryParamMatchRules) Adds the specifiedHttpJsonTranscodingQueryParamMatchRule
which is used to matchQueryParams
of anHttpRequest
with fields in aMessage
.
-
Method Details
-
queryParamMatchRules
public HttpJsonTranscodingOptionsBuilder queryParamMatchRules(HttpJsonTranscodingQueryParamMatchRule... queryParamMatchRules) Adds the specifiedHttpJsonTranscodingQueryParamMatchRule
which is used to matchQueryParams
of anHttpRequest
with fields in aMessage
. If not set,HttpJsonTranscodingQueryParamMatchRule.ORIGINAL_FIELD
is used by default. -
queryParamMatchRules
public HttpJsonTranscodingOptionsBuilder queryParamMatchRules(Iterable<HttpJsonTranscodingQueryParamMatchRule> queryParamMatchRules) Adds the specifiedHttpJsonTranscodingQueryParamMatchRule
which is used to matchQueryParams
of anHttpRequest
with fields in aMessage
. If not set,HttpJsonTranscodingQueryParamMatchRule.ORIGINAL_FIELD
is used by default. -
errorHandler
@UnstableApi public HttpJsonTranscodingOptionsBuilder errorHandler(UnframedGrpcErrorHandler errorHandler) Sets an error handler which handles an exception raised while serving a gRPC request transcoded from an HTTP/JSON request. By default,UnframedGrpcErrorHandler.ofJson()
would be set. -
build
Returns a newly createdHttpJsonTranscodingOptions
.
-