Class GrpcRouting.Builder

java.lang.Object
io.helidon.webserver.grpc.GrpcRouting.Builder
All Implemented Interfaces:
Builder<GrpcRouting.Builder,GrpcRouting>, Supplier<GrpcRouting>
Enclosing class:
GrpcRouting

public static class GrpcRouting.Builder extends Object implements Builder<GrpcRouting.Builder,GrpcRouting>
Fluent API builder for GrpcRouting.
  • Method Details

    • build

      public GrpcRouting build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<GrpcRouting.Builder,GrpcRouting>
      Returns:
      instance of the built type
    • service

      public GrpcRouting.Builder service(GrpcService service)
      Configure grpc service.
      Parameters:
      service - service to add
      Returns:
      updated builder
    • unary

      public <ReqT, ResT> GrpcRouting.Builder unary(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.UnaryMethod<ReqT,ResT> method)
      Unary route.
      Type Parameters:
      ReqT - request type
      ResT - response type
      Parameters:
      proto - proto descriptor
      serviceName - service name
      methodName - method name
      method - method to handle this route
      Returns:
      updated builder
    • bidi

      public <ReqT, ResT> GrpcRouting.Builder bidi(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,ResT> method)
      Bidirectional route.
      Type Parameters:
      ReqT - request type
      ResT - response type
      Parameters:
      proto - proto descriptor
      serviceName - service name
      methodName - method name
      method - method to handle this route
      Returns:
      updated builder
    • serverStream

      public <ReqT, ResT> GrpcRouting.Builder serverStream(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,ResT> method)
      Server streaming route.
      Type Parameters:
      ReqT - request type
      ResT - response type
      Parameters:
      proto - proto descriptor
      serviceName - service name
      methodName - method name
      method - method to handle this route
      Returns:
      updated builder
    • clientStream

      public <ReqT, ResT> GrpcRouting.Builder clientStream(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,ResT> method)
      Client streaming route.
      Type Parameters:
      ReqT - request type
      ResT - response type
      Parameters:
      proto - proto descriptor
      serviceName - service name
      methodName - method name
      method - method to handle this route
      Returns:
      updated builder
    • service

      public GrpcRouting.Builder service(com.google.protobuf.Descriptors.FileDescriptor proto, io.grpc.BindableService service)
      Add all the routes for a BindableService service.
      Parameters:
      proto - the proto descriptor
      service - the BindableService to add routes for
      Returns:
      updated builder
    • service

      public GrpcRouting.Builder service(io.grpc.ServerServiceDefinition service)
      Add all the routes for the ServerServiceDefinition service.
      Parameters:
      service - the ServerServiceDefinition to add routes for
      Returns:
      updated builder