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
ClientStreamimplementations.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 forReadableBufferimplementations.Abstract base class forServerStreamimplementations.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(LoadBalancer.CreateSubchannelArgs).Sits betweenAbstractStream.TransportStateandMessageDeframerto deframe in the client thread.Listener for when deframing on the application thread, which calls the real listener on the transport thread.Alongatomically updated due to errors caused by the value being too small.An implementation ofLongCounterthat 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 ofClientStreams.Extension ofStreamto 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(ClientTransport.PingCallback, Executor)is received.Pre-configured factory for creatingConnectionClientTransportinstances.AReadableBufferthat is composed of 0 or moreReadableBuffers.A simple read operation to perform on a singleReadableBuffer.AManagedClientTransportthat is based on a connection.Manages connectivity states of the channel.Utility to load dynamically Conscrypt when it is available.Utility base implementation ofRunnablethat 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.ResourceResolveris a Dns ResourceRecord resolver.DnsNameResolver.ResourceResolverFactoryis a factory for making resource resolvers.Describes a parsed SRV record.A provider forDnsNameResolver.Retry Policy for Transport reconnection.An implementation ofClientStreamthat fails (by callingClientStreamListener.closed(Status, ClientStreamListener.RpcProgress, 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 theauthoritybased 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 toInflaterto 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.JndiResourceResolverFactoryresolves 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 aRunnablethat logs any exception thrown by it, before re-throwing it.An interface for a long base counter.A factory for creatingLongCounterobjects.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 toNameResolverfor use in cases where the target string doesn't include a port.An interface for Transport implementors to provide theClientTransportFactoryappropriate for the channel.Default implementation ofManagedChannelImplBuilder.ChannelBuilderDefaultPortProviderthat returns a fixed port.Convenience ClientTransportFactoryBuilder, throws UnsupportedOperationException().Best effort detecting channels that has not been properly cleaned up.ManagedChannelServiceConfigis a fully parsed and validated representation of service configuration data.Equivalent of MethodConfig from a ServiceConfig with restrictions from Channel setting.AClientTransportthat 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.AnInputStreamthat enforces theMessageDeframer.SizeEnforcingInputStream.maxMessageSizelimit 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 ofClientStreamthat silently does nothing for the operations.ObjectPool<T>An object pool.A ManagedChannel backed by a singleInternalSubchanneland used forLoadBalancerto its own RPC needs.Adapter for tracers into details consumers.ALoadBalancerthat 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.ALoadBalancerthat 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 usingProxySelectorand 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 creatingReadableBufferinstances.AnInputStreamthat is backed by aReadableBuffer.AReadableBufferthat is backed by a byte array.AReadableBufferthat is backed by aByteBuffer.ALongCounterthat is implemented with a JDK8.invalid reference
LongAdderReschedules a runnable lazily.RetriableStream<ReqT>A logicalClientStreamthat 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 pollingNameResolverimplementation that supports callingRetryingNameResolver.ResolutionResultListeners 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 forServerinstances, 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 ofStreamto 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.ServiceConfigStateholds 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 ofStreamevents.A producer for deframed gRPC messages.ADeframerthat 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 toMessageFramerso it can send chunks of data to the transport in a form that the transport can directly serialize.