java.lang.Object
io.helidon.grpc.client.ClientMethodDescriptor.Builder
- All Implemented Interfaces:
Builder<ClientMethodDescriptor.Builder,,ClientMethodDescriptor> ClientMethodDescriptor.Rules,Supplier<ClientMethodDescriptor>
- Enclosing class:
- ClientMethodDescriptor
public static class ClientMethodDescriptor.Builder
extends Object
implements ClientMethodDescriptor.Rules, Builder<ClientMethodDescriptor.Builder,ClientMethodDescriptor>
MethodDescriptor builder implementation.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a new instance ofClientMethodDescriptor.callCredentials(io.grpc.CallCredentials callCredentials) Register the specifiedCallCredentialsto be used for this method.intercept(int priority, io.grpc.ClientInterceptor... interceptors) Register one or moreinterceptorsfor the method.intercept(io.grpc.ClientInterceptor... interceptors) Register one or moreinterceptorsfor the method.marshallerSupplier(MarshallerSupplier supplier) Register theMarshallerSupplierfor the method.methodHandler(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.
-
Method Details
-
requestType
Description copied from interface:ClientMethodDescriptor.RulesSets the type of parameter of this method.- Specified by:
requestTypein interfaceClientMethodDescriptor.Rules- Parameters:
type- The type of parameter of this method.- Returns:
- this
ClientMethodDescriptor.Rulesinstance for fluent call chaining
-
responseType
Description copied from interface:ClientMethodDescriptor.RulesSets the type of parameter of this method.- Specified by:
responseTypein interfaceClientMethodDescriptor.Rules- Parameters:
type- The type of parameter of this method.- Returns:
- this
ClientMethodDescriptor.Rulesinstance for fluent call chaining
-
intercept
Description copied from interface:ClientMethodDescriptor.RulesRegister one or moreinterceptorsfor the method.- Specified by:
interceptin interfaceClientMethodDescriptor.Rules- Parameters:
interceptors- the interceptor(s) to register- Returns:
- this
ClientMethodDescriptor.Rulesinstance for fluent call chaining
-
intercept
public ClientMethodDescriptor.Builder intercept(int priority, io.grpc.ClientInterceptor... interceptors) Description copied from interface:ClientMethodDescriptor.RulesRegister one or moreinterceptorsfor the method.The added interceptors will be applied using the specified priority.
- Specified by:
interceptin interfaceClientMethodDescriptor.Rules- Parameters:
priority- the priority to assign to the interceptorsinterceptors- one or moreClientInterceptors to register- Returns:
- this
ClientMethodDescriptor.Rulesto allow fluent method chaining
-
marshallerSupplier
Description copied from interface:ClientMethodDescriptor.RulesRegister theMarshallerSupplierfor the method.If not set the default
MarshallerSupplierfrom the service will be used.- Specified by:
marshallerSupplierin interfaceClientMethodDescriptor.Rules- Parameters:
supplier- theMarshallerSupplierfor the service- Returns:
- this
ClientMethodDescriptor.Rulesinstance for fluent call chaining
-
methodHandler
Description copied from interface:ClientMethodDescriptor.RulesSet theMethodHandlerthat can be used to invoke the method.- Specified by:
methodHandlerin interfaceClientMethodDescriptor.Rules- Parameters:
methodHandler- the {2link MethodHandler} to use- Returns:
- this
ClientMethodDescriptor.Rulesinstance for fluent call chaining
-
callCredentials
Description copied from interface:ClientMethodDescriptor.RulesRegister the specifiedCallCredentialsto be used for this method. This overrides anyCallCredentialsset on theClientServiceDescriptor.- Specified by:
callCredentialsin interfaceClientMethodDescriptor.Rules- Parameters:
callCredentials- theCallCredentialsto set.- Returns:
- this
ClientMethodDescriptor.Rulesinstance for fluent call chaining
-
build
Builds and returns a new instance ofClientMethodDescriptor.- Specified by:
buildin interfaceBuilder<ClientMethodDescriptor.Builder,ClientMethodDescriptor> - Returns:
- a new instance of
ClientMethodDescriptor
-