Package io.grpc.internal
Class ManagedChannelImpl.ConfigSelectingClientCall<ReqT,RespT>
java.lang.Object
io.grpc.ClientCall<ReqT,RespT>
io.grpc.PartialForwardingClientCall<ReqT,RespT>
io.grpc.ForwardingClientCall<ReqT,RespT>
io.grpc.internal.ManagedChannelImpl.ConfigSelectingClientCall<ReqT,RespT>
- Enclosing class:
ManagedChannelImpl
static final class ManagedChannelImpl.ConfigSelectingClientCall<ReqT,RespT>
extends ForwardingClientCall<ReqT,RespT>
A client call for a given channel that applies a given config selector when it starts.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.ForwardingClientCall
ForwardingClientCall.SimpleForwardingClientCall<ReqT,
RespT> Nested classes/interfaces inherited from class io.grpc.ClientCall
ClientCall.Listener<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Executor
private CallOptions
private final Channel
private final InternalConfigSelector
private final Context
private ClientCall
<ReqT, RespT> private final MethodDescriptor
<ReqT, RespT> -
Constructor Summary
ConstructorsConstructorDescriptionConfigSelectingClientCall
(InternalConfigSelector configSelector, Channel channel, Executor channelExecutor, MethodDescriptor<ReqT, RespT> method, CallOptions callOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Prevent any further processing for thisClientCall
.protected ClientCall
<ReqT, RespT> delegate()
Returns the delegatedClientCall
.private void
executeCloseObserverInContext
(ClientCall.Listener<RespT> observer, Status status) void
start
(ClientCall.Listener<RespT> observer, Metadata headers) Start a call, usingresponseListener
for processing response messages.Methods inherited from class io.grpc.ForwardingClientCall
sendMessage
Methods inherited from class io.grpc.PartialForwardingClientCall
getAttributes, halfClose, isReady, request, setMessageCompression, toString
-
Field Details
-
configSelector
-
channel
-
callExecutor
-
method
-
context
-
callOptions
-
delegate
-
-
Constructor Details
-
ConfigSelectingClientCall
ConfigSelectingClientCall(InternalConfigSelector configSelector, Channel channel, Executor channelExecutor, MethodDescriptor<ReqT, RespT> method, CallOptions callOptions)
-
-
Method Details
-
delegate
Description copied from class:ForwardingClientCall
Returns the delegatedClientCall
.- Specified by:
delegate
in classForwardingClientCall<ReqT,
RespT>
-
start
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.- Overrides:
start
in classForwardingClientCall<ReqT,
RespT> - Parameters:
observer
- receives response messagesheaders
- which can contain extra call metadata, e.g. authentication credentials.
-
executeCloseObserverInContext
-
cancel
Description copied from class:ClientCall
Prevent any further processing for thisClientCall
. No further messages may be sent or will be received. The server is informed of cancellations, but may not stop processing the call. Cancellation is permitted even if previouslyClientCall.halfClose()
d. Cancelling an alreadycancel()
edClientCall
has no effect.No other methods on this class can be called after this method has been called.
It is recommended that at least one of the arguments to be non-
null
, to provide useful debug information. Both argument being null may log warnings and result in suboptimal performance. Also note that the provided information will not be sent to the server.- Overrides:
cancel
in classPartialForwardingClientCall<ReqT,
RespT> - Parameters:
message
- if notnull
, will appear as the description of the CANCELLED statuscause
- if notnull
, will appear as the cause of the CANCELLED status
-