Module io.helidon.webserver.grpc
Package io.helidon.webserver.grpc
Interface GrpcServiceDescriptor.Rules
- All Known Implementing Classes:
- GrpcServiceDescriptor.Builder
- Enclosing class:
- GrpcServiceDescriptor
public static interface GrpcServiceDescriptor.Rules
Fluent configuration interface for the 
GrpcServiceDescriptor.- 
Method SummaryModifier and TypeMethodDescriptionaddContextValue(io.grpc.Context.Key<V> key, V value) Add value to theContextfor the service.<ReqT,ResT> 
 GrpcServiceDescriptor.Rulesbidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT, ResT> method) Register bi-directional streaming method for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.Rulesbidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register bi-directional streaming method for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.RulesclientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT, ResT> method) Register client streaming method for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.RulesclientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register client streaming method for the service.intercept(int priority, io.grpc.ServerInterceptor... interceptors) Add one or moreServerInterceptorinstances that will intercept calls to this service.intercept(io.grpc.ServerInterceptor... interceptors) Add one or moreServerInterceptorinstances that will intercept calls to this service.Register one or moreinterceptorsfor a named method of the service.Register one or moreinterceptorsfor a named method of the service.marshallerSupplier(MarshallerSupplier marshallerSupplier) Register theMarshallerSupplierfor the service.name()Obtain the name fo the service this configuration configures.Set the name for the service.proto(com.google.protobuf.Descriptors.FileDescriptor proto) Register the proto for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.RulesserverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT, ResT> method) Register server streaming method for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.RulesserverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register server streaming method for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.RulesRegister unary method for the service.<ReqT,ResT> 
 GrpcServiceDescriptor.Rulesunary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register unary method for the service.
- 
Method Details- 
nameSet the name for the service.- Parameters:
- name- the service name
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
- Throws:
- NullPointerException- if the name is null
- IllegalArgumentException- if the name is a blank String
 
- 
nameString name()Obtain the name fo the service this configuration configures.- Returns:
- the name fo the service this configuration configures
 
- 
protoRegister the proto for the service.- Parameters:
- proto- the service proto
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
marshallerSupplierRegister theMarshallerSupplierfor the service.- Parameters:
- marshallerSupplier- the- MarshallerSupplierfor the service
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
interceptAdd one or moreServerInterceptorinstances that will intercept calls to this service.If the added interceptors are annotated with the Weightannotation then that value will be used to assign a weight to use when applying the interceptor otherwise a priority ofInterceptorWeights.USERwill be used.- Parameters:
- interceptors- one or more- ServerInterceptors to add
- Returns:
- this builder to allow fluent method chaining
 
- 
interceptAdd one or moreServerInterceptorinstances 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 interceptors
- interceptors- one or more- ServerInterceptors to add
- Returns:
- this builder to allow fluent method chaining
 
- 
interceptRegister one or moreinterceptorsfor a named method of the service.If the added interceptors are annotated with the Weightannotation then that value will be used to assign a weight to use when applying the interceptor otherwise a priority ofInterceptorWeights.USERwill be used.- Parameters:
- methodName- the name of the method to intercept
- interceptors- the interceptor(s) to register
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
- Throws:
- IllegalArgumentException- if no method exists for the specified name
 
- 
interceptGrpcServiceDescriptor.Rules intercept(String methodName, int priority, io.grpc.ServerInterceptor... 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 intercept
- priority- the priority to assign to the interceptors
- interceptors- the interceptor(s) to register
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
- Throws:
- IllegalArgumentException- if no method exists for the specified name
 
- 
addContextValueAdd value to theContextfor the service.- Type Parameters:
- V- the type of the value
- Parameters:
- key- the key for the context value
- value- the value to add
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
unary<ReqT,ResT> GrpcServiceDescriptor.Rules unary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT, ResT> method) Register unary method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the unary method to register
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
unary<ReqT,ResT> GrpcServiceDescriptor.Rules unary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register unary method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the unary method to register
- configurer- the method configurer
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
serverStreaming<ReqT,ResT> GrpcServiceDescriptor.Rules serverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT, ResT> method) Register server streaming method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the server streaming method to register
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
serverStreaming<ReqT,ResT> GrpcServiceDescriptor.Rules serverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register server streaming method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the server streaming method to register
- configurer- the method configurer
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
clientStreaming<ReqT,ResT> GrpcServiceDescriptor.Rules clientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT, ResT> method) Register client streaming method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the client streaming method to register
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
clientStreaming<ReqT,ResT> GrpcServiceDescriptor.Rules clientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register client streaming method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the client streaming method to register
- configurer- the method configurer
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
bidirectional<ReqT,ResT> GrpcServiceDescriptor.Rules bidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT, ResT> method) Register bi-directional streaming method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the bi-directional streaming method to register
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
- 
bidirectional<ReqT,ResT> GrpcServiceDescriptor.Rules bidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT, ResT> method, GrpcMethodDescriptor.Configurer<ReqT, ResT> configurer) Register bi-directional streaming method for the service.- Type Parameters:
- ReqT- the method request type
- ResT- the method response type
- Parameters:
- name- the name of the method
- method- the bi-directional streaming method to register
- configurer- the method configurer
- Returns:
- this GrpcServiceDescriptor.Rulesinstance for fluent call chaining
 
 
-