Package io.grpc
Class ServerServiceDefinition.Builder
- java.lang.Object
-
- io.grpc.ServerServiceDefinition.Builder
-
- Enclosing class:
- ServerServiceDefinition
public static final class ServerServiceDefinition.Builder extends Object
Builder for constructing Service instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ReqT,RespT>
ServerServiceDefinition.BuilderaddMethod(MethodDescriptor<ReqT,RespT> method, ServerCallHandler<ReqT,RespT> handler)
Add a method to be supported by the service.<ReqT,RespT>
ServerServiceDefinition.BuilderaddMethod(ServerMethodDefinition<ReqT,RespT> def)
Add a method to be supported by the service.ServerServiceDefinition
build()
Construct new ServerServiceDefinition.
-
-
-
Method Detail
-
addMethod
public <ReqT,RespT> ServerServiceDefinition.Builder addMethod(MethodDescriptor<ReqT,RespT> method, ServerCallHandler<ReqT,RespT> handler)
Add a method to be supported by the service.- Parameters:
method
- theMethodDescriptor
of this method.handler
- handler for incoming calls
-
addMethod
public <ReqT,RespT> ServerServiceDefinition.Builder addMethod(ServerMethodDefinition<ReqT,RespT> def)
Add a method to be supported by the service.
-
build
public ServerServiceDefinition build()
Construct new ServerServiceDefinition.
-
-