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 Summary
Modifier and TypeMethodDescription<ReqT,
ResT>
GrpcRouting.Builderbidi
(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT, ResT> method) Bidirectional route.build()
Build the instance from this builder.<ReqT,
ResT>
GrpcRouting.BuilderclientStream
(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT, ResT> method) Client streaming route.<ReqT,
ResT>
GrpcRouting.BuilderserverStream
(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT, ResT> method) Server streaming route.service
(com.google.protobuf.Descriptors.FileDescriptor proto, io.grpc.BindableService service) Add all the routes for aBindableService
service.service
(io.grpc.ServerServiceDefinition service) Add all the routes for theServerServiceDefinition
service.service
(GrpcService service) Configure grpc service.<ReqT,
ResT>
GrpcRouting.Builderunary
(com.google.protobuf.Descriptors.FileDescriptor proto, String serviceName, String methodName, io.grpc.stub.ServerCalls.UnaryMethod<ReqT, ResT> method) Unary route.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<GrpcRouting.Builder,
GrpcRouting> - Returns:
- instance of the built type
-
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 typeResT
- response type- Parameters:
proto
- proto descriptorserviceName
- service namemethodName
- method namemethod
- 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 typeResT
- response type- Parameters:
proto
- proto descriptorserviceName
- service namemethodName
- method namemethod
- 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 typeResT
- response type- Parameters:
proto
- proto descriptorserviceName
- service namemethodName
- method namemethod
- 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 typeResT
- response type- Parameters:
proto
- proto descriptorserviceName
- service namemethodName
- method namemethod
- 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 aBindableService
service.- Parameters:
proto
- the proto descriptorservice
- theBindableService
to add routes for- Returns:
- updated builder
-
service
Add all the routes for theServerServiceDefinition
service.- Parameters:
service
- theServerServiceDefinition
to add routes for- Returns:
- updated builder
-