Class CallCredentialsApplyingTransportFactory.CallCredentialsApplyingTransport
java.lang.Object
io.grpc.internal.ForwardingConnectionClientTransport
io.grpc.internal.CallCredentialsApplyingTransportFactory.CallCredentialsApplyingTransport
- All Implemented Interfaces:
ClientTransport, ConnectionClientTransport, ManagedClientTransport, InternalInstrumented<InternalChannelz.SocketStats>, InternalWithLogId
- Enclosing class:
CallCredentialsApplyingTransportFactory
private class CallCredentialsApplyingTransportFactory.CallCredentialsApplyingTransport
extends ForwardingConnectionClientTransport
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClientTransport
ClientTransport.PingCallbackNested classes/interfaces inherited from interface ManagedClientTransport
ManagedClientTransport.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MetadataApplierImpl.MetadataApplierListenerprivate final Stringprivate final ConnectionClientTransportprivate final AtomicIntegerprivate Statusprivate Statusprivate Status -
Constructor Summary
ConstructorsConstructorDescriptionCallCredentialsApplyingTransport(ConnectionClientTransport delegate, String authority) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionClientTransportdelegate()private voidnewStream(MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions, ClientStreamTracer[] tracers) Creates a new stream for sending messages to a remote end-point.voidInitiates an orderly shutdown of the transport.voidshutdownNow(Status status) Initiates a forceful shutdown in which preexisting and new calls are closed.Methods inherited from class ForwardingConnectionClientTransport
getAttributes, getLogId, getStats, ping, start, toString
-
Field Details
-
delegate
-
authority
-
pendingApplier
-
shutdownStatus
-
savedShutdownStatus
-
savedShutdownNowStatus
-
applierListener
-
-
Constructor Details
-
CallCredentialsApplyingTransport
CallCredentialsApplyingTransport(ConnectionClientTransport delegate, String authority)
-
-
Method Details
-
delegate
- Specified by:
delegatein classForwardingConnectionClientTransport
-
newStream
public ClientStream newStream(MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions, ClientStreamTracer[] tracers) Description copied from interface:ClientTransportCreates a new stream for sending messages to a remote end-point.This method returns immediately and does not wait for any validation of the request. If creation fails for any reason,
ClientStreamListener.closed(Status, ClientStreamListener.RpcProgress, Metadata)will be called to provide the error information. Any sent messages for this stream will be buffered until creation has completed (either successfully or unsuccessfully).This method is called under the
Contextof theClientCall.- Specified by:
newStreamin interfaceClientTransport- Overrides:
newStreamin classForwardingConnectionClientTransport- Parameters:
method- the descriptor of the remote method to be called for this stream.headers- to send at the beginning of the callcallOptions- runtime options of the calltracers- a non-empty array of tracers. The last element in it is reserved to be set by the load balancer's pick result and otherwise is a no-op tracer.- Returns:
- the newly created stream.
-
shutdown
Description copied from interface:ManagedClientTransportInitiates an orderly shutdown of the transport. Existing streams continue, but the transport will not own any new streams. New streams will either fail (onceManagedClientTransport.Listener.transportShutdown(Status)callback called), or be transferred off this transport (in which case they may succeed). This method may only be called once.- Specified by:
shutdownin interfaceManagedClientTransport- Overrides:
shutdownin classForwardingConnectionClientTransport
-
shutdownNow
Description copied from interface:ManagedClientTransportInitiates a forceful shutdown in which preexisting and new calls are closed. Existing calls should be closed with the providedreason.- Specified by:
shutdownNowin interfaceManagedClientTransport- Overrides:
shutdownNowin classForwardingConnectionClientTransport
-
maybeShutdown
private void maybeShutdown()
-