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>
AClientCallwhich forwards all of its methods to anotherClientCall.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classForwardingClientCall.SimpleForwardingClientCall<ReqT,RespT>A simplified version ofForwardingClientCallwhere subclasses can pass in aClientCallas 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.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 io.grpc.PartialForwardingClientCall
cancel, getAttributes, halfClose, isReady, request, setMessageCompression, toString
-
-
-
-
Method Detail
-
delegate
protected abstract ClientCall<ReqT,RespT> delegate()
Returns the delegatedClientCall.- Specified by:
delegatein classPartialForwardingClientCall<ReqT,RespT>
-
start
public void start(ClientCall.Listener<RespT> responseListener, Metadata headers)
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(java.lang.String, java.lang.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
public void sendMessage(ReqT message)
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.
-
-