Package io.grpc
Class ForwardingServerCall<ReqT,RespT>
- java.lang.Object
-
- io.grpc.ServerCall<ReqT,RespT>
-
- io.grpc.PartialForwardingServerCall<ReqT,RespT>
-
- io.grpc.ForwardingServerCall<ReqT,RespT>
-
- Direct Known Subclasses:
ForwardingServerCall.SimpleForwardingServerCall
,ServerStreamTracer.ReadOnlyServerCall
public abstract class ForwardingServerCall<ReqT,RespT> extends PartialForwardingServerCall<ReqT,RespT>
AServerCall
which forwards all of its methods to anotherServerCall
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ForwardingServerCall.SimpleForwardingServerCall<ReqT,RespT>
A simplified version ofForwardingServerCall
where subclasses can pass in aServerCall
as the delegate.-
Nested classes/interfaces inherited from class io.grpc.ServerCall
ServerCall.Listener<ReqT>
-
-
Constructor Summary
Constructors Constructor Description ForwardingServerCall()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ServerCall<ReqT,RespT>
delegate()
Returns the delegatedServerCall
.MethodDescriptor<ReqT,RespT>
getMethodDescriptor()
TheMethodDescriptor
for the call.void
sendMessage(RespT message)
Send a response message.-
Methods inherited from class io.grpc.PartialForwardingServerCall
close, getAttributes, getAuthority, getSecurityLevel, isCancelled, isReady, request, sendHeaders, setCompression, setMessageCompression, setOnReadyThreshold, toString
-
-
-
-
Method Detail
-
delegate
protected abstract ServerCall<ReqT,RespT> delegate()
Returns the delegatedServerCall
.- Specified by:
delegate
in classPartialForwardingServerCall<ReqT,RespT>
-
sendMessage
public void sendMessage(RespT message)
Description copied from class:ServerCall
Send a response message. Messages are the primary form of communication associated with RPCs. Multiple response messages may exist for streaming calls.- Specified by:
sendMessage
in classServerCall<ReqT,RespT>
- Parameters:
message
- response message.
-
getMethodDescriptor
public MethodDescriptor<ReqT,RespT> getMethodDescriptor()
Description copied from class:ServerCall
TheMethodDescriptor
for the call.- Specified by:
getMethodDescriptor
in classServerCall<ReqT,RespT>
-
-