- java.lang.Object
-
- io.helidon.grpc.client.ClientServiceDescriptor.Builder
-
- All Implemented Interfaces:
Builder<ClientServiceDescriptor>
,ClientServiceDescriptor.Rules
,Supplier<ClientServiceDescriptor>
- Enclosing class:
- ClientServiceDescriptor
public static final class ClientServiceDescriptor.Builder extends Object implements ClientServiceDescriptor.Rules, Builder<ClientServiceDescriptor>
AClientServiceDescriptor
builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientServiceDescriptor.Builder
bidirectional(String name)
Register bi-directional streaming method for the service.ClientServiceDescriptor.Builder
bidirectional(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register bi-directional streaming method for the service.ClientServiceDescriptor
build()
Build the instance from this builder.ClientServiceDescriptor.Builder
callCredentials(io.grpc.CallCredentials callCredentials)
Register theCallCredentials
to be used for this service.ClientServiceDescriptor.Builder
callCredentials(String methodName, io.grpc.CallCredentials callCredentials)
Register theCallCredentials
to be used for the specified method in this service.ClientServiceDescriptor.Builder
clientStreaming(String name)
Register client streaming method for the service.ClientServiceDescriptor.Builder
clientStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register client streaming method for the service.ClientServiceDescriptor.Rules
intercept(int priority, io.grpc.ClientInterceptor... interceptors)
Add one or moreClientInterceptor
instances that will intercept calls to this service.ClientServiceDescriptor.Builder
intercept(io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptors
for the service.ClientServiceDescriptor.Builder
intercept(String methodName, int priority, io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptors
for a named method of the service.ClientServiceDescriptor.Builder
intercept(String methodName, io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptors
for a named method of the service.ClientServiceDescriptor.Builder
marshallerSupplier(MarshallerSupplier marshallerSupplier)
Register theMarshallerSupplier
for the service.String
name()
Obtain the name fo the service this configuration configures.ClientServiceDescriptor.Builder
name(String serviceName)
Set the name for the service.ClientServiceDescriptor.Builder
proto(com.google.protobuf.Descriptors.FileDescriptor proto)
Register the proto file for the service.ClientServiceDescriptor.Builder
serverStreaming(String name)
Register server streaming method for the service.ClientServiceDescriptor.Builder
serverStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register server streaming method for the service.ClientServiceDescriptor.Builder
unary(String name)
Register unary method for the service.ClientServiceDescriptor.Builder
unary(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register unary method for the service.
-
-
-
Method Detail
-
name
public String name()
Description copied from interface:ClientServiceDescriptor.Rules
Obtain the name fo the service this configuration configures.- Specified by:
name
in interfaceClientServiceDescriptor.Rules
- Returns:
- the name fo the service this configuration configures
-
name
public ClientServiceDescriptor.Builder name(String serviceName)
Description copied from interface:ClientServiceDescriptor.Rules
Set the name for the service.- Specified by:
name
in interfaceClientServiceDescriptor.Rules
- Parameters:
serviceName
- the name of service- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
proto
public ClientServiceDescriptor.Builder proto(com.google.protobuf.Descriptors.FileDescriptor proto)
Description copied from interface:ClientServiceDescriptor.Rules
Register the proto file for the service.- Specified by:
proto
in interfaceClientServiceDescriptor.Rules
- Parameters:
proto
- the service proto- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
marshallerSupplier
public ClientServiceDescriptor.Builder marshallerSupplier(MarshallerSupplier marshallerSupplier)
Description copied from interface:ClientServiceDescriptor.Rules
Register theMarshallerSupplier
for the service.- Specified by:
marshallerSupplier
in interfaceClientServiceDescriptor.Rules
- Parameters:
marshallerSupplier
- theMarshallerSupplier
for the service- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
unary
public ClientServiceDescriptor.Builder unary(String name)
Description copied from interface:ClientServiceDescriptor.Rules
Register unary method for the service.- Specified by:
unary
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- The getName of the method- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
unary
public ClientServiceDescriptor.Builder unary(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Description copied from interface:ClientServiceDescriptor.Rules
Register unary method for the service.- Specified by:
unary
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- the name of the methodconfigurer
- the method configurer- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
serverStreaming
public ClientServiceDescriptor.Builder serverStreaming(String name)
Description copied from interface:ClientServiceDescriptor.Rules
Register server streaming method for the service.- Specified by:
serverStreaming
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- The name of the method- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
serverStreaming
public ClientServiceDescriptor.Builder serverStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Description copied from interface:ClientServiceDescriptor.Rules
Register server streaming method for the service.- Specified by:
serverStreaming
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- the name of the methodconfigurer
- the method configurer- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
clientStreaming
public ClientServiceDescriptor.Builder clientStreaming(String name)
Description copied from interface:ClientServiceDescriptor.Rules
Register client streaming method for the service.- Specified by:
clientStreaming
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- The name of the method- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
clientStreaming
public ClientServiceDescriptor.Builder clientStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Description copied from interface:ClientServiceDescriptor.Rules
Register client streaming method for the service.- Specified by:
clientStreaming
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- the name of the methodconfigurer
- the method configurer- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
bidirectional
public ClientServiceDescriptor.Builder bidirectional(String name)
Description copied from interface:ClientServiceDescriptor.Rules
Register bi-directional streaming method for the service.- Specified by:
bidirectional
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- The name of the method- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
bidirectional
public ClientServiceDescriptor.Builder bidirectional(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Description copied from interface:ClientServiceDescriptor.Rules
Register bi-directional streaming method for the service.- Specified by:
bidirectional
in interfaceClientServiceDescriptor.Rules
- Parameters:
name
- the name of the methodconfigurer
- the method configurer- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
intercept
public ClientServiceDescriptor.Builder intercept(io.grpc.ClientInterceptor... interceptors)
Description copied from interface:ClientServiceDescriptor.Rules
Register one or moreinterceptors
for the service.- Specified by:
intercept
in interfaceClientServiceDescriptor.Rules
- Parameters:
interceptors
- the interceptor(s) to register- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
intercept
public ClientServiceDescriptor.Rules intercept(int priority, io.grpc.ClientInterceptor... interceptors)
Description copied from interface:ClientServiceDescriptor.Rules
Add one or moreClientInterceptor
instances that will intercept calls to this service.The added interceptors will be applied using the specified priority.
- Specified by:
intercept
in interfaceClientServiceDescriptor.Rules
- Parameters:
priority
- the priority to assign to the interceptorsinterceptors
- one or moreClientInterceptor
s to add- Returns:
- this builder to allow fluent method chaining
-
intercept
public ClientServiceDescriptor.Builder intercept(String methodName, io.grpc.ClientInterceptor... interceptors)
Description copied from interface:ClientServiceDescriptor.Rules
Register one or moreinterceptors
for a named method of the service.- Specified by:
intercept
in interfaceClientServiceDescriptor.Rules
- Parameters:
methodName
- the name of the method to interceptinterceptors
- the interceptor(s) to register- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
intercept
public ClientServiceDescriptor.Builder intercept(String methodName, int priority, io.grpc.ClientInterceptor... interceptors)
Description copied from interface:ClientServiceDescriptor.Rules
Register one or moreinterceptors
for a named method of the service.The added interceptors will be applied using the specified priority.
- Specified by:
intercept
in interfaceClientServiceDescriptor.Rules
- Parameters:
methodName
- the name of the method to interceptpriority
- the priority to assign to the interceptorsinterceptors
- the interceptor(s) to register- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
callCredentials
public ClientServiceDescriptor.Builder callCredentials(io.grpc.CallCredentials callCredentials)
Description copied from interface:ClientServiceDescriptor.Rules
Register theCallCredentials
to be used for this service.- Specified by:
callCredentials
in interfaceClientServiceDescriptor.Rules
- Parameters:
callCredentials
- theCallCredentials
to set.- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
callCredentials
public ClientServiceDescriptor.Builder callCredentials(String methodName, io.grpc.CallCredentials callCredentials)
Description copied from interface:ClientServiceDescriptor.Rules
Register theCallCredentials
to be used for the specified method in this service. This overrides anyCallCredentials
set on thisClientServiceDescriptor
- Specified by:
callCredentials
in interfaceClientServiceDescriptor.Rules
- Parameters:
methodName
- the method namecallCredentials
- theCallCredentials
to set.- Returns:
- this
ClientServiceDescriptor.Rules
instance for fluent call chaining
-
build
public ClientServiceDescriptor build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<ClientServiceDescriptor>
- Returns:
- instance of the built type
-
-