- java.lang.Object
- 
- io.helidon.grpc.server.ServiceDescriptor.Builder
 
- 
- All Implemented Interfaces:
- Builder<ServiceDescriptor>,- ServiceDescriptor.Rules,- Supplier<ServiceDescriptor>
 - Enclosing class:
- ServiceDescriptor
 
 public static final class ServiceDescriptor.Builder extends Object implements ServiceDescriptor.Rules, Builder<ServiceDescriptor> AServiceDescriptorbuilder.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> ServiceDescriptor.BuilderaddContextValue(io.grpc.Context.Key<V> key, V value)Add value to theContextfor the service.<ReqT,ResT>
 ServiceDescriptor.Builderbidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,ResT> method)Register bi-directional streaming method for the service.<ReqT,ResT>
 ServiceDescriptor.Builderbidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer)Register bi-directional streaming method for the service.ServiceDescriptorbuild()Build the instance from this builder.<ReqT,ResT>
 ServiceDescriptor.BuilderclientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,ResT> method)Register client streaming method for the service.<ReqT,ResT>
 ServiceDescriptor.BuilderclientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer)Register client streaming method for the service.ServiceDescriptor.BuilderhealthCheck(HealthCheck healthCheck)Register the serviceHealthCheck.ServiceDescriptor.Builderintercept(int priority, io.grpc.ServerInterceptor... interceptors)Add one or moreServerInterceptorinstances that will intercept calls to this service.ServiceDescriptor.Builderintercept(io.grpc.ServerInterceptor... interceptors)Add one or moreServerInterceptorinstances that will intercept calls to this service.ServiceDescriptor.Builderintercept(String methodName, int priority, io.grpc.ServerInterceptor... interceptors)Register one or moreinterceptorsfor a named method of the service.ServiceDescriptor.Builderintercept(String methodName, io.grpc.ServerInterceptor... interceptors)Register one or moreinterceptorsfor a named method of the service.ServiceDescriptor.BuildermarshallerSupplier(MarshallerSupplier marshallerSupplier)Register theMarshallerSupplierfor the service.Stringname()Obtain the name fo the service this configuration configures.ServiceDescriptor.Buildername(String name)Set the name for the service.ServiceDescriptor.Builderproto(com.google.protobuf.Descriptors.FileDescriptor proto)Register the proto for the service.<ReqT,ResT>
 ServiceDescriptor.BuilderserverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,ResT> method)Register server streaming method for the service.<ReqT,ResT>
 ServiceDescriptor.BuilderserverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer)Register server streaming method for the service.StringtoString()<ReqT,ResT>
 ServiceDescriptor.Builderunary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT,ResT> method)Register unary method for the service.<ReqT,ResT>
 ServiceDescriptor.Builderunary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer)Register unary method for the service.
 
- 
- 
- 
Method Detail- 
namepublic String name() Description copied from interface:ServiceDescriptor.RulesObtain the name fo the service this configuration configures.- Specified by:
- namein interface- ServiceDescriptor.Rules
- Returns:
- the name fo the service this configuration configures
 
 - 
namepublic ServiceDescriptor.Builder name(String name) Description copied from interface:ServiceDescriptor.RulesSet the name for the service.- Specified by:
- namein interface- ServiceDescriptor.Rules
- Parameters:
- name- the service name
- Returns:
- this ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
protopublic ServiceDescriptor.Builder proto(com.google.protobuf.Descriptors.FileDescriptor proto) Description copied from interface:ServiceDescriptor.RulesRegister the proto for the service.- Specified by:
- protoin interface- ServiceDescriptor.Rules
- Parameters:
- proto- the service proto
- Returns:
- this ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
marshallerSupplierpublic ServiceDescriptor.Builder marshallerSupplier(MarshallerSupplier marshallerSupplier) Description copied from interface:ServiceDescriptor.RulesRegister theMarshallerSupplierfor the service.- Specified by:
- marshallerSupplierin interface- ServiceDescriptor.Rules
- Parameters:
- marshallerSupplier- the- MarshallerSupplierfor the service
- Returns:
- this ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
unarypublic <ReqT,ResT> ServiceDescriptor.Builder unary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT,ResT> method) Description copied from interface:ServiceDescriptor.RulesRegister unary method for the service.- Specified by:
- unaryin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
unarypublic <ReqT,ResT> ServiceDescriptor.Builder unary(String name, io.grpc.stub.ServerCalls.UnaryMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer) Description copied from interface:ServiceDescriptor.RulesRegister unary method for the service.- Specified by:
- unaryin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
serverStreamingpublic <ReqT,ResT> ServiceDescriptor.Builder serverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,ResT> method) Description copied from interface:ServiceDescriptor.RulesRegister server streaming method for the service.- Specified by:
- serverStreamingin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
serverStreamingpublic <ReqT,ResT> ServiceDescriptor.Builder serverStreaming(String name, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer) Description copied from interface:ServiceDescriptor.RulesRegister server streaming method for the service.- Specified by:
- serverStreamingin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
clientStreamingpublic <ReqT,ResT> ServiceDescriptor.Builder clientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,ResT> method) Description copied from interface:ServiceDescriptor.RulesRegister client streaming method for the service.- Specified by:
- clientStreamingin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
clientStreamingpublic <ReqT,ResT> ServiceDescriptor.Builder clientStreaming(String name, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer) Description copied from interface:ServiceDescriptor.RulesRegister client streaming method for the service.- Specified by:
- clientStreamingin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
bidirectionalpublic <ReqT,ResT> ServiceDescriptor.Builder bidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,ResT> method) Description copied from interface:ServiceDescriptor.RulesRegister bi-directional streaming method for the service.- Specified by:
- bidirectionalin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
bidirectionalpublic <ReqT,ResT> ServiceDescriptor.Builder bidirectional(String name, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,ResT> method, MethodDescriptor.Configurer<ReqT,ResT> configurer) Description copied from interface:ServiceDescriptor.RulesRegister bi-directional streaming method for the service.- Specified by:
- bidirectionalin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
interceptpublic ServiceDescriptor.Builder intercept(io.grpc.ServerInterceptor... interceptors) Description copied from interface:ServiceDescriptor.RulesAdd one or moreServerInterceptorinstances that will intercept calls to this service.If the added interceptors are annotated with the Priorityannotation then that value will be used to assign a priority to use when applying the interceptor otherwise a priority ofInterceptorPriorities.USERwill be used.- Specified by:
- interceptin interface- ServiceDescriptor.Rules
- Parameters:
- interceptors- one or more- ServerInterceptors to add
- Returns:
- this builder to allow fluent method chaining
 
 - 
interceptpublic ServiceDescriptor.Builder intercept(int priority, io.grpc.ServerInterceptor... interceptors) Description copied from interface:ServiceDescriptor.RulesAdd one or moreServerInterceptorinstances that will intercept calls to this service.The added interceptors will be applied using the specified priority. - Specified by:
- interceptin interface- ServiceDescriptor.Rules
- Parameters:
- priority- the priority to assign to the interceptors
- interceptors- one or more- ServerInterceptors to add
- Returns:
- this builder to allow fluent method chaining
 
 - 
interceptpublic ServiceDescriptor.Builder intercept(String methodName, io.grpc.ServerInterceptor... interceptors) Description copied from interface:ServiceDescriptor.RulesRegister one or moreinterceptorsfor a named method of the service.If the added interceptors are annotated with the Priorityannotation then that value will be used to assign a priority to use when applying the interceptor otherwise a priority ofInterceptorPriorities.USERwill be used.- Specified by:
- interceptin interface- ServiceDescriptor.Rules
- Parameters:
- methodName- the name of the method to intercept
- interceptors- the interceptor(s) to register
- Returns:
- this ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
interceptpublic ServiceDescriptor.Builder intercept(String methodName, int priority, io.grpc.ServerInterceptor... interceptors) Description copied from interface:ServiceDescriptor.RulesRegister one or moreinterceptorsfor a named method of the service.The added interceptors will be applied using the specified priority. - Specified by:
- interceptin interface- ServiceDescriptor.Rules
- 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 ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
addContextValuepublic <V> ServiceDescriptor.Builder addContextValue(io.grpc.Context.Key<V> key, V value) Description copied from interface:ServiceDescriptor.RulesAdd value to theContextfor the service.- Specified by:
- addContextValuein interface- ServiceDescriptor.Rules
- Type Parameters:
- V- the type of the value
- Parameters:
- key- the key for the context value
- value- the value to add
- Returns:
- this ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
healthCheckpublic ServiceDescriptor.Builder healthCheck(HealthCheck healthCheck) Description copied from interface:ServiceDescriptor.RulesRegister the serviceHealthCheck.- Specified by:
- healthCheckin interface- ServiceDescriptor.Rules
- Parameters:
- healthCheck- the service- HealthCheck
- Returns:
- this ServiceDescriptor.Rulesinstance for fluent call chaining
 
 - 
buildpublic ServiceDescriptor build() Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
- buildin interface- Builder<ServiceDescriptor>
- Returns:
- instance of the built type
 
 
- 
 
-