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 specifiedCallCredentials
to be used for this method.intercept
(int priority, io.grpc.ClientInterceptor... interceptors) Register one or moreinterceptors
for the method.intercept
(io.grpc.ClientInterceptor... interceptors) Register one or moreinterceptors
for the method.marshallerSupplier
(MarshallerSupplier supplier) Register theMarshallerSupplier
for the method.methodHandler
(MethodHandler methodHandler) Set theMethodHandler
that 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.Rules
Sets the type of parameter of this method.- Specified by:
requestType
in interfaceClientMethodDescriptor.Rules
- Parameters:
type
- The type of parameter of this method.- Returns:
- this
ClientMethodDescriptor.Rules
instance for fluent call chaining
-
responseType
Description copied from interface:ClientMethodDescriptor.Rules
Sets the type of parameter of this method.- Specified by:
responseType
in interfaceClientMethodDescriptor.Rules
- Parameters:
type
- The type of parameter of this method.- Returns:
- this
ClientMethodDescriptor.Rules
instance for fluent call chaining
-
intercept
Description copied from interface:ClientMethodDescriptor.Rules
Register one or moreinterceptors
for the method.- Specified by:
intercept
in interfaceClientMethodDescriptor.Rules
- Parameters:
interceptors
- the interceptor(s) to register- Returns:
- this
ClientMethodDescriptor.Rules
instance for fluent call chaining
-
intercept
public ClientMethodDescriptor.Builder intercept(int priority, io.grpc.ClientInterceptor... interceptors) Description copied from interface:ClientMethodDescriptor.Rules
Register one or moreinterceptors
for the method.The added interceptors will be applied using the specified priority.
- Specified by:
intercept
in interfaceClientMethodDescriptor.Rules
- Parameters:
priority
- the priority to assign to the interceptorsinterceptors
- one or moreClientInterceptor
s to register- Returns:
- this
ClientMethodDescriptor.Rules
to allow fluent method chaining
-
marshallerSupplier
Description copied from interface:ClientMethodDescriptor.Rules
Register theMarshallerSupplier
for the method.If not set the default
MarshallerSupplier
from the service will be used.- Specified by:
marshallerSupplier
in interfaceClientMethodDescriptor.Rules
- Parameters:
supplier
- theMarshallerSupplier
for the service- Returns:
- this
ClientMethodDescriptor.Rules
instance for fluent call chaining
-
methodHandler
Description copied from interface:ClientMethodDescriptor.Rules
Set theMethodHandler
that can be used to invoke the method.- Specified by:
methodHandler
in interfaceClientMethodDescriptor.Rules
- Parameters:
methodHandler
- the {2link MethodHandler} to use- Returns:
- this
ClientMethodDescriptor.Rules
instance for fluent call chaining
-
callCredentials
Description copied from interface:ClientMethodDescriptor.Rules
Register the specifiedCallCredentials
to be used for this method. This overrides anyCallCredentials
set on theClientServiceDescriptor
.- Specified by:
callCredentials
in interfaceClientMethodDescriptor.Rules
- Parameters:
callCredentials
- theCallCredentials
to set.- Returns:
- this
ClientMethodDescriptor.Rules
instance for fluent call chaining
-
build
Builds and returns a new instance ofClientMethodDescriptor
.- Specified by:
build
in interfaceBuilder<ClientMethodDescriptor.Builder,
ClientMethodDescriptor> - Returns:
- a new instance of
ClientMethodDescriptor
-