Package io.grpc
Class ForwardingClientCall<ReqT,RespT>
- java.lang.Object
-
- io.grpc.ClientCall<ReqT,RespT>
-
- io.grpc.PartialForwardingClientCall<ReqT,RespT>
-
- io.grpc.ForwardingClientCall<ReqT,RespT>
-
- Direct Known Subclasses:
ClientInterceptors.CheckedForwardingClientCall
,ForwardingClientCall.SimpleForwardingClientCall
,ManagedChannelImpl.ConfigSelectingClientCall
public abstract class ForwardingClientCall<ReqT,RespT> extends PartialForwardingClientCall<ReqT,RespT>
AClientCall
which forwards all of its methods to anotherClientCall
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ForwardingClientCall.SimpleForwardingClientCall<ReqT,RespT>
A simplified version ofForwardingClientCall
where subclasses can pass in aClientCall
as the delegate.-
Nested classes/interfaces inherited from class io.grpc.ClientCall
ClientCall.Listener<T>
-
-
Constructor Summary
Constructors Constructor Description ForwardingClientCall()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ClientCall<ReqT,RespT>
delegate()
Returns the delegatedClientCall
.void
sendMessage(ReqT message)
Send a request message to the server.void
start(ClientCall.Listener<RespT> responseListener, Metadata headers)
Start a call, usingresponseListener
for processing response messages.-
Methods inherited from class io.grpc.PartialForwardingClientCall
cancel, getAttributes, halfClose, isReady, request, setMessageCompression, toString
-
-
-
-
Method Detail
-
delegate
protected abstract ClientCall<ReqT,RespT> delegate()
Returns the delegatedClientCall
.- Specified by:
delegate
in classPartialForwardingClientCall<ReqT,RespT>
-
start
public void start(ClientCall.Listener<RespT> responseListener, Metadata headers)
Description copied from class:ClientCall
Start a call, usingresponseListener
for processing response messages.It must be called prior to any other method on this class, except for
ClientCall.cancel(java.lang.String, java.lang.Throwable)
which may be called at any time.Since
Metadata
is not thread-safe, the caller must not access (read or write)headers
after this point.- Specified by:
start
in classClientCall<ReqT,RespT>
- Parameters:
responseListener
- receives response messagesheaders
- which can contain extra call metadata, e.g. authentication credentials.
-
sendMessage
public void sendMessage(ReqT message)
Description copied from class:ClientCall
Send a request message to the server. May be called zero or more times depending on how many messages the server is willing to accept for the operation.- Specified by:
sendMessage
in classClientCall<ReqT,RespT>
- Parameters:
message
- message to be sent to the server.
-
-