Package io.helidon.grpc.client
Interface ClientServiceDescriptor.Rules
-
- All Known Implementing Classes:
ClientServiceDescriptor.Builder
- Enclosing class:
- ClientServiceDescriptor
public static interface ClientServiceDescriptor.RulesFluent configuration interface for theClientServiceDescriptor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClientServiceDescriptor.Rulesbidirectional(String name)Register bi-directional streaming method for the service.ClientServiceDescriptor.Rulesbidirectional(String name, Consumer<ClientMethodDescriptor.Rules> configurer)Register bi-directional streaming method for the service.ClientServiceDescriptor.RulescallCredentials(io.grpc.CallCredentials callCredentials)Register theCallCredentialsto be used for this service.ClientServiceDescriptor.RulescallCredentials(String name, io.grpc.CallCredentials callCredentials)Register theCallCredentialsto be used for the specified method in this service.ClientServiceDescriptor.RulesclientStreaming(String name)Register client streaming method for the service.ClientServiceDescriptor.RulesclientStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)Register client streaming method for the service.ClientServiceDescriptor.Rulesintercept(int priority, io.grpc.ClientInterceptor... interceptors)Add one or moreClientInterceptorinstances that will intercept calls to this service.ClientServiceDescriptor.Rulesintercept(io.grpc.ClientInterceptor... interceptors)Register one or moreinterceptorsfor the service.ClientServiceDescriptor.Rulesintercept(String methodName, int priority, io.grpc.ClientInterceptor... interceptors)Register one or moreinterceptorsfor a named method of the service.ClientServiceDescriptor.Rulesintercept(String methodName, io.grpc.ClientInterceptor... interceptors)Register one or moreinterceptorsfor a named method of the service.ClientServiceDescriptor.RulesmarshallerSupplier(MarshallerSupplier marshallerSupplier)Register theMarshallerSupplierfor the service.Stringname()Obtain the name fo the service this configuration configures.ClientServiceDescriptor.Rulesname(String name)Set the name for the service.ClientServiceDescriptor.Rulesproto(com.google.protobuf.Descriptors.FileDescriptor proto)Register the proto file for the service.ClientServiceDescriptor.RulesserverStreaming(String name)Register server streaming method for the service.ClientServiceDescriptor.RulesserverStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)Register server streaming method for the service.ClientServiceDescriptor.Rulesunary(String name)Register unary method for the service.ClientServiceDescriptor.Rulesunary(String name, Consumer<ClientMethodDescriptor.Rules> configurer)Register unary method for the service.
-
-
-
Method Detail
-
name
String name()
Obtain the name fo the service this configuration configures.- Returns:
- the name fo the service this configuration configures
-
name
ClientServiceDescriptor.Rules name(String name)
Set the name for the service.- Parameters:
name- the name of service- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining - Throws:
NullPointerException- if the getName is nullIllegalArgumentException- if the getName is a blank String
-
proto
ClientServiceDescriptor.Rules proto(com.google.protobuf.Descriptors.FileDescriptor proto)
Register the proto file for the service.- Parameters:
proto- the service proto- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
marshallerSupplier
ClientServiceDescriptor.Rules marshallerSupplier(MarshallerSupplier marshallerSupplier)
Register theMarshallerSupplierfor the service.- Parameters:
marshallerSupplier- theMarshallerSupplierfor the service- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
intercept
ClientServiceDescriptor.Rules intercept(io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptorsfor the service.- Parameters:
interceptors- the interceptor(s) to register- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
intercept
ClientServiceDescriptor.Rules intercept(int priority, io.grpc.ClientInterceptor... interceptors)
Add one or moreClientInterceptorinstances that will intercept calls to this service.The added interceptors will be applied using the specified priority.
- Parameters:
priority- the priority to assign to the interceptorsinterceptors- one or moreClientInterceptors to add- Returns:
- this builder to allow fluent method chaining
-
intercept
ClientServiceDescriptor.Rules intercept(String methodName, io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptorsfor a named method of the service.- Parameters:
methodName- the name of the method to interceptinterceptors- the interceptor(s) to register- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining - Throws:
IllegalArgumentException- if no method exists for the specified getName
-
intercept
ClientServiceDescriptor.Rules intercept(String methodName, int priority, io.grpc.ClientInterceptor... interceptors)
Register one or moreinterceptorsfor a named method of the service.The added interceptors will be applied using the specified priority.
- Parameters:
methodName- the name of the method to interceptpriority- the priority to assign to the interceptorsinterceptors- the interceptor(s) to register- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining - Throws:
IllegalArgumentException- if no method exists for the specified name
-
unary
ClientServiceDescriptor.Rules unary(String name)
Register unary method for the service.- Parameters:
name- The getName of the method- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
unary
ClientServiceDescriptor.Rules unary(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register unary method for the service.- Parameters:
name- the name of the methodconfigurer- the method configurer- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
serverStreaming
ClientServiceDescriptor.Rules serverStreaming(String name)
Register server streaming method for the service.- Parameters:
name- The name of the method- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
serverStreaming
ClientServiceDescriptor.Rules serverStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register server streaming method for the service.- Parameters:
name- the name of the methodconfigurer- the method configurer- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
clientStreaming
ClientServiceDescriptor.Rules clientStreaming(String name)
Register client streaming method for the service.- Parameters:
name- The name of the method- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
clientStreaming
ClientServiceDescriptor.Rules clientStreaming(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register client streaming method for the service.- Parameters:
name- the name of the methodconfigurer- the method configurer- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
bidirectional
ClientServiceDescriptor.Rules bidirectional(String name)
Register bi-directional streaming method for the service.- Parameters:
name- The name of the method- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
bidirectional
ClientServiceDescriptor.Rules bidirectional(String name, Consumer<ClientMethodDescriptor.Rules> configurer)
Register bi-directional streaming method for the service.- Parameters:
name- the name of the methodconfigurer- the method configurer- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
callCredentials
ClientServiceDescriptor.Rules callCredentials(io.grpc.CallCredentials callCredentials)
Register theCallCredentialsto be used for this service.- Parameters:
callCredentials- theCallCredentialsto set.- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
callCredentials
ClientServiceDescriptor.Rules callCredentials(String name, io.grpc.CallCredentials callCredentials)
Register theCallCredentialsto be used for the specified method in this service. This overrides anyCallCredentialsset on thisClientServiceDescriptor- Parameters:
name- the method namecallCredentials- theCallCredentialsto set.- Returns:
- this
ClientServiceDescriptor.Rulesinstance for fluent call chaining
-
-