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>
A
ClientCall which forwards all of its methods to another ClientCall.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA simplified version ofForwardingClientCallwhere subclasses can pass in aClientCallas the delegate.Nested classes/interfaces inherited from class ClientCall
ClientCall.Listener<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ClientCall<ReqT, RespT> delegate()Returns the delegatedClientCall.voidsendMessage(ReqT message) Send a request message to the server.voidstart(ClientCall.Listener<RespT> responseListener, Metadata headers) Start a call, usingresponseListenerfor processing response messages.Methods inherited from class PartialForwardingClientCall
cancel, getAttributes, halfClose, isReady, request, setMessageCompression, toString
-
Constructor Details
-
ForwardingClientCall
public ForwardingClientCall()
-
-
Method Details
-
delegate
Returns the delegatedClientCall.- Specified by:
delegatein classPartialForwardingClientCall<ReqT,RespT>
-
start
Description copied from class:ClientCallStart a call, usingresponseListenerfor processing response messages.It must be called prior to any other method on this class, except for
ClientCall.cancel(String, Throwable)which may be called at any time.Since
Metadatais not thread-safe, the caller must not access (read or write)headersafter this point.- Specified by:
startin classClientCall<ReqT,RespT> - Parameters:
responseListener- receives response messagesheaders- which can contain extra call metadata, e.g. authentication credentials.
-
sendMessage
Description copied from class:ClientCallSend 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:
sendMessagein classClientCall<ReqT,RespT> - Parameters:
message- message to be sent to the server.
-