Module io.helidon.webclient.grpc
Package io.helidon.webclient.grpc
Class GrpcClientMethodDescriptor.Builder
java.lang.Object
io.helidon.webclient.grpc.GrpcClientMethodDescriptor.Builder
- All Implemented Interfaces:
io.helidon.common.Builder<GrpcClientMethodDescriptor.Builder,,GrpcClientMethodDescriptor> GrpcClientMethodDescriptor.Rules,Supplier<GrpcClientMethodDescriptor>
- Enclosing class:
GrpcClientMethodDescriptor
public static class GrpcClientMethodDescriptor.Builder
extends Object
implements GrpcClientMethodDescriptor.Rules, io.helidon.common.Builder<GrpcClientMethodDescriptor.Builder,GrpcClientMethodDescriptor>
MethodDescriptor builder implementation.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a new instance ofGrpcClientMethodDescriptor.callCredentials(io.grpc.CallCredentials callCredentials) Register the specifiedCallCredentialsto be used for this method.intercept(double weight, io.grpc.ClientInterceptor... interceptors) Register one or moreinterceptorsfor the method.intercept(io.grpc.ClientInterceptor... interceptors) Register one or moreinterceptorsfor the method.marshallerSupplier(io.helidon.grpc.core.MarshallerSupplier supplier) Register theMarshallerSupplierfor the method.methodHandler(io.helidon.grpc.core.MethodHandler<?, ?> methodHandler) Set theMethodHandlerthat can be used to invoke the method.requestType(Class<?> type) Sets the type of parameter of this method.responseType(Class<?> type) Sets the type of parameter of this method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.common.Builder
get, identity, update
-
Method Details
-
requestType
Description copied from interface:GrpcClientMethodDescriptor.RulesSets the type of parameter of this method.- Specified by:
requestTypein interfaceGrpcClientMethodDescriptor.Rules- Parameters:
type- The type of parameter of this method.- Returns:
- this
GrpcClientMethodDescriptor.Rulesinstance for fluent call chaining
-
responseType
Description copied from interface:GrpcClientMethodDescriptor.RulesSets the type of parameter of this method.- Specified by:
responseTypein interfaceGrpcClientMethodDescriptor.Rules- Parameters:
type- The type of parameter of this method.- Returns:
- this
GrpcClientMethodDescriptor.Rulesinstance for fluent call chaining
-
intercept
Description copied from interface:GrpcClientMethodDescriptor.RulesRegister one or moreinterceptorsfor the method.- Specified by:
interceptin interfaceGrpcClientMethodDescriptor.Rules- Parameters:
interceptors- the interceptor(s) to register- Returns:
- this
GrpcClientMethodDescriptor.Rulesinstance for fluent call chaining
-
intercept
public GrpcClientMethodDescriptor.Builder intercept(double weight, io.grpc.ClientInterceptor... interceptors) Description copied from interface:GrpcClientMethodDescriptor.RulesRegister one or moreinterceptorsfor the method.The added interceptors will be applied using the specified priority.
- Specified by:
interceptin interfaceGrpcClientMethodDescriptor.Rules- Parameters:
weight- the weight to assign to the interceptorsinterceptors- one or moreClientInterceptors to register- Returns:
- this
GrpcClientMethodDescriptor.Rulesto allow fluent method chaining
-
marshallerSupplier
public GrpcClientMethodDescriptor.Builder marshallerSupplier(io.helidon.grpc.core.MarshallerSupplier supplier) Description copied from interface:GrpcClientMethodDescriptor.RulesRegister theMarshallerSupplierfor the method.If not set the default
MarshallerSupplierfrom the service will be used.- Specified by:
marshallerSupplierin interfaceGrpcClientMethodDescriptor.Rules- Parameters:
supplier- theMarshallerSupplierfor the service- Returns:
- this
GrpcClientMethodDescriptor.Rulesinstance for fluent call chaining
-
methodHandler
public GrpcClientMethodDescriptor.Builder methodHandler(io.helidon.grpc.core.MethodHandler<?, ?> methodHandler) Description copied from interface:GrpcClientMethodDescriptor.RulesSet theMethodHandlerthat can be used to invoke the method.- Specified by:
methodHandlerin interfaceGrpcClientMethodDescriptor.Rules- Parameters:
methodHandler- the {2link MethodHandler} to use- Returns:
- this
GrpcClientMethodDescriptor.Rulesinstance for fluent call chaining
-
callCredentials
Description copied from interface:GrpcClientMethodDescriptor.RulesRegister the specifiedCallCredentialsto be used for this method. This overrides anyCallCredentialsset on theGrpcClientMethodDescriptor.- Specified by:
callCredentialsin interfaceGrpcClientMethodDescriptor.Rules- Parameters:
callCredentials- theCallCredentialsto set.- Returns:
- this
GrpcClientMethodDescriptor.Rulesinstance for fluent call chaining
-
build
Builds and returns a new instance ofGrpcClientMethodDescriptor.- Specified by:
buildin interfaceio.helidon.common.Builder<GrpcClientMethodDescriptor.Builder,GrpcClientMethodDescriptor> - Returns:
- a new instance of
GrpcClientMethodDescriptor
-