Package io.grpc.internal
@Internal
package io.grpc.internal
Interfaces and implementations that are internal to gRPC.
All the content under this package and its subpackages are considered annotated with Internal
.
-
ClassDescriptionThe abstract base class for
ClientStream
implementations.A sink for outbound operations, separated from the stream simply to avoid name collisions/confusion.This should only be called from the transport thread.Abstract base class forReadableBuffer
implementations.Abstract base class forServerStream
implementations.A sink for outbound operations, separated from the stream simply to avoid name collisions/confusion.This should only be called from the transport thread (except for private interactions withAbstractServerStream
).The stream and stream state as used by the application.Stream state as used by the transport.The base interface of the Subchannels returned byLoadBalancer.Helper.createSubchannel(io.grpc.LoadBalancer.CreateSubchannelArgs)
.Sits betweenAbstractStream.TransportState
andMessageDeframer
to deframe in the client thread.Listener for when deframing on the application thread, which calls the real listener on the transport thread.Along
atomically updated due to errors caused by the value being too small.An implementation ofLongCounter
that is just anAtomicLong
.Determines how long to wait before doing some action (typically a retry, or a reconnect).Schedules a retry operation according to aBackoffPolicy
.A collection of call stats for channelz.Tracks a collections of channel tracing events for a channel/subchannel.ClientCallImpl<ReqT,RespT> Implementation ofClientCall
.Provider ofClientStream
s.Extension ofStream
to support client-side termination semantics.An observer of client-side stream events.The progress of the RPC when client stream listener is closed.The client-side transport typically encapsulating a single connection to a remote server.A callback that is invoked when the acknowledgement to aClientTransport.ping(io.grpc.internal.ClientTransport.PingCallback, java.util.concurrent.Executor)
is received.Pre-configured factory for creatingConnectionClientTransport
instances.AReadableBuffer
that is composed of 0 or moreReadableBuffer
s.A simple read operation to perform on a singleReadableBuffer
.AManagedClientTransport
that is based on a connection.Manages connectivity states of the channel.Utility to load dynamically Conscrypt when it is available.Utility base implementation ofRunnable
that performs the same function asContext.wrap(Runnable)
without requiring the construction of an additional object.Interface for deframing gRPC messages.DelayedClientCall<ReqT,RespT> A call that queues requests before a real call is ready to be delegated to.A client transport that queues requests before a real transport is available.A stream that queues requests before the transport is available, and delegates to a real stream implementation when the transport is available.A DNS-basedNameResolver
.AddressResolver resolves a hostname into a list of addresses.Used as a DNS-based name resolver's internal representation of resolution result.DnsNameResolver.ResourceResolver
is a Dns ResourceRecord resolver.DnsNameResolver.ResourceResolverFactory
is a factory for making resource resolvers.Describes a parsed SRV record.A provider forDnsNameResolver
.Retry Policy for Transport reconnection.An implementation ofClientStream
that fails (by callingClientStreamListener.closed(io.grpc.Status, io.grpc.internal.ClientStreamListener.RpcProgress, io.grpc.Metadata)
) when started, and silently does nothing for the other operations.A client transport that creates streams that will immediately fail when started.An object pool that always returns the same instance and does nothing when returning the object.Forwards listener callbacks to a delegate.A forwarding class to ensure non overridden methods are forwarded to the delegate.Base class for a wrapper around anotherReadableBuffer
.Interface for framing gRPC messages.Special attributes that are only useful to gRPC.Common utilities for GRPC.Percent encode theauthority
based on https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.All error codes identified by the HTTP/2 spec.Marshals a nanoseconds representation of the timeout to and from a string representation, consisting of an ASCII decimal representation of a number with at most 8 digits, followed by a unit.Processes gzip streams, delegating toInflater
to perform on-demand inflation of the deflated blocks.Hedging policy data object.Base implementation for client streams using HTTP2 as the transport.Represents an outstanding PING operation on an HTTP/2 channel.Builds a concise and readable string that gives insight of the concerned part of the system.An object that accepts new incoming connections on one or more listening socket addresses.Transports for a singleSocketAddress
.Index as in 'i', the pointer to an entry.Aggregates the in-use state of a set of objects.JndiResourceResolverFactory
resolves additional records for the DnsNameResolver.Parses JSON with as few preconceived notions as possible.Helper utility to work with JSON values in Java types.Monitors the client's PING usage to make sure the rate is permitted.Manages keepalive pings.Default client sideKeepAliveManager.KeepAlivePinger
.A simple wrapper for aRunnable
that logs any exception thrown by it, before re-throwing it.An interface for a long base counter.A factory for creatingLongCounter
objects.A communication channel for making outgoing RPCs.ManagedChannelImpl.ConfigSelectingClientCall<ReqT,RespT> A client call for a given channel that applies a given config selector when it starts.Lazily request for Executor from an executor pool.A ResolutionState indicates the status of last name resolution.Default managed channel builder, for usage in Transport implementations.An interface for Transport implementors to provide a default port toNameResolver
for use in cases where the target string doesn't include a port.An interface for Transport implementors to provide theClientTransportFactory
appropriate for the channel.Default implementation ofManagedChannelImplBuilder.ChannelBuilderDefaultPortProvider
that returns a fixed port.Convenience ClientTransportFactoryBuilder, throws UnsupportedOperationException().Best effort detecting channels that has not been properly cleaned up.ManagedChannelServiceConfig
is a fully parsed and validated representation of service configuration data.Equivalent of MethodConfig from a ServiceConfig with restrictions from Channel setting.AClientTransport
that has life-cycle management.Receives notifications for the transport life-cycle events.Monitors connection idle time; shutdowns the connection if the max connection idle is reached.Deframer for GRPC frames.A listener of deframing events.AnInputStream
that enforces theMessageDeframer.SizeEnforcingInputStream.maxMessageSize
limit for compressed frames.Encodes gRPC messages to be delivered via the transport layer which implementsMessageFramer.Sink
.Sink implemented by the transport layer to receive frames and forward them to their destination.Provides a central point for gRPC components to record metric values.Recorder for instrument values produced by a batch callback.A deframer that moves decoding between the transport and app threads based on which is more efficient at that moment.An implementation ofClientStream
that silently does nothing for the operations.ObjectPool<T>An object pool.A ManagedChannel backed by a singleInternalSubchannel
and used forLoadBalancer
to its own RPC needs.Adapter for tracers into details consumers.ALoadBalancer
that provides no load-balancing over the addresses from theNameResolver
.Index as in 'i', the pointer to an entry.No-op picker which doesn't add any custom picking logic.ALoadBalancer
that provides no load-balancing over the addresses from theNameResolver
.No-op picker which doesn't add any custom picking logic.Provider for the "pick_first" balancing policy.Implementation ofLoadBalancer.PickSubchannelArgs
.A utility class that detects proxies usingProxySelector
and detects authentication credentials usingAuthenticator
.This interface makes unit testing easier by avoiding direct calls to static methods.Interface for an abstract byte buffer.Utility methods for creatingReadableBuffer
instances.AnInputStream
that is backed by aReadableBuffer
.AReadableBuffer
that is backed by a byte array.AReadableBuffer
that is backed by aByteBuffer
.ALongCounter
that is implemented with a JDK8invalid reference
LongAdder
Reschedules a runnable lazily.RetriableStream<ReqT>A logicalClientStream
that is retriable.Used to keep track of the total amount of memory used to buffer retryable or hedged RPCs for the Channel.Allows cancelling a Future without racing with setting the future.A wrapper of a physical stream of a retry/hedging attempt, that comes with some useful attributes.Used for retry throttling.This wrapper class can add retry capability to any pollingNameResolver
implementation that supports callingRetryingNameResolver.ResolutionResultListener
s with the outcome of each resolution.Retry policy data object.This interface is used to schedule future retry attempts for a failed operation.The library built-in implementation of service config parser.Executes a task directly in the calling thread, unless it's a reentrant call in which case the task is enqueued and executed once the calling task completes.ServerCallImpl<ReqT,RespT> All of these callbacks are assumed to called on an application thread, and the caller is responsible for handling thrown exceptions.ServerCallInfoImpl<ReqT,RespT> An implementation ofServerStreamTracer.ServerCallInfo
.Default implementation ofServer
, for creation by transports.Dispatches callbacks onto an application-provided executor and correctly propagates exceptions.Default builder forServer
instances, for usage in Transport implementations.An interface to provide to provide transport specific information for the server.A listener to a server for transport creation events.Extension ofStream
to support server-side termination semantics.An observer of server-side stream events.An inbound connection.A observer of a server-side transport for stream creation events.ServiceConfigState
holds the state of the current service config.Helper utility to work with service configs.A LoadBalancingConfig that includes the policy name (the key) and its raw config value (parsed JSON).A holder for shared resource singletons.Defines a resource, and the way to create and destroy instances of it.An ObjectPool backed by aSharedResourceHolder.Resource
.Provides utilities to manage SPIFFE bundles, extract SPIFFE IDs from X.509 certificate chains, and parse SPIFFE IDs.Represents a SPIFFE trust bundle; that is, a map from trust domain to set of trusted certificates.Represents a SPIFFE ID as defined in the SPIFFE standard.A delegating Listener that throws away notifications of messagesAvailable() after the deframer has closed or failed.The stats and tracing information for a stream.A single stream of communication between two end-points within a transport.An observer ofStream
events.A producer for deframed gRPC messages.ADeframer
that optimizations by taking over part of the thread safety.Time source representing the current system time in nanos.Utility functions for transport layer framing.Provides transports for sending RPCs.A class for gathering statistics about a transport.An interface for reading the local and remote flow control windows of the transport.A container that holds the local and remote flow control window sizes.An interface for a byte buffer that can only be written to.An allocator of buffers provided by the transport implementation toMessageFramer
so it can send chunks of data to the transport in a form that the transport can directly serialize.