public final class ServerMethodDefinition<ReqT,RespT>
extends java.lang.Object
Server
.ServerServiceDefinition
Modifier and Type | Method | Description |
---|---|---|
static <ReqT,RespT> |
create(MethodDescriptor<ReqT,RespT> method,
ServerCallHandler<ReqT,RespT> handler) |
Create a new instance.
|
MethodDescriptor<ReqT,RespT> |
getMethodDescriptor() |
The
MethodDescriptor for this method. |
ServerCallHandler<ReqT,RespT> |
getServerCallHandler() |
Handler for incoming calls.
|
ServerMethodDefinition<ReqT,RespT> |
withServerCallHandler(ServerCallHandler<ReqT,RespT> handler) |
Create a new method definition with a different call handler.
|
public static <ReqT,RespT> ServerMethodDefinition<ReqT,RespT> create(MethodDescriptor<ReqT,RespT> method, ServerCallHandler<ReqT,RespT> handler)
method
- the MethodDescriptor
for this method.handler
- to dispatch calls to.public MethodDescriptor<ReqT,RespT> getMethodDescriptor()
MethodDescriptor
for this method.public ServerCallHandler<ReqT,RespT> getServerCallHandler()
public ServerMethodDefinition<ReqT,RespT> withServerCallHandler(ServerCallHandler<ReqT,RespT> handler)
handler
- to bind to a cloned instance of this.