- java.lang.Object
-
- io.helidon.grpc.client.ClientMethodDescriptor.Builder
-
- All Implemented Interfaces:
Builder<ClientMethodDescriptor>
,ClientMethodDescriptor.Rules
,Supplier<ClientMethodDescriptor>
- Enclosing class:
- ClientMethodDescriptor
public static class ClientMethodDescriptor.Builder extends Object implements ClientMethodDescriptor.Rules, Builder<ClientMethodDescriptor>
MethodDescriptor
builder implementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientMethodDescriptor
build()
Builds and returns a new instance ofClientMethodDescriptor
.ClientMethodDescriptor.Rules
callCredentials(io.grpc.CallCredentials callCredentials)
Register the specifiedCallCredentials
to be used for this method.ClientMethodDescriptor.Builder
intercept(int priority, io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptors
for the method.ClientMethodDescriptor.Builder
intercept(io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptors
for the method.ClientMethodDescriptor.Builder
marshallerSupplier(MarshallerSupplier supplier)
Register theMarshallerSupplier
for the method.ClientMethodDescriptor.Builder
methodHandler(MethodHandler methodHandler)
Set theMethodHandler
that can be used to invoke the method.ClientMethodDescriptor.Builder
requestType(Class type)
Sets the type of parameter of this method.ClientMethodDescriptor.Builder
responseType(Class type)
Sets the type of parameter of this method.
-
-
-
Method Detail
-
requestType
public ClientMethodDescriptor.Builder requestType(Class type)
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
public ClientMethodDescriptor.Builder responseType(Class type)
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
public ClientMethodDescriptor.Builder intercept(io.grpc.ClientInterceptor... interceptors)
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
public ClientMethodDescriptor.Builder marshallerSupplier(MarshallerSupplier supplier)
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
public ClientMethodDescriptor.Builder methodHandler(MethodHandler 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
public ClientMethodDescriptor.Rules callCredentials(io.grpc.CallCredentials 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
public ClientMethodDescriptor build()
Builds and returns a new instance ofClientMethodDescriptor
.- Specified by:
build
in interfaceBuilder<ClientMethodDescriptor>
- Returns:
- a new instance of
ClientMethodDescriptor
-
-