Package | Description |
---|---|
io.grpc |
The gRPC core public API.
|
io.grpc.grpclb | |
io.grpc.inprocess |
The in-process transport which is for when a server is in the same process as the client.
|
io.grpc.netty |
The main transport implementation based on Netty,
for both the client and the server.
|
io.grpc.okhttp |
A lightweight transport based on
OkHttp, mainly for use on Android
(client-only).
|
io.grpc.protobuf |
API for gRPC over Protocol Buffers, including tools for serializing and de-serializing protobuf
messages.
|
io.grpc.protobuf.lite |
API for gRPC over Protocol Buffers with proto message classes generated by the Lite Runtime
library.
|
io.grpc.protobuf.services |
Service definitions and utilities with protobuf dependency for the pre-defined gRPC services.
|
io.grpc.services |
Service definitions and utilities for the pre-defined gRPC services.
|
io.grpc.stub |
API for the Stub layer.
|
io.grpc.testing |
API that is useful for testing gRPC.
|
io.grpc.util |
Utilities with advanced features in the core layer that user can optionally use.
|
io.grpc.xds |
Library for gPRC proxyless service mesh using Envoy xDS protocol.
|
io.grpc.xds.orca |
Package | Description |
---|---|
io.grpc.xds |
Library for gPRC proxyless service mesh using Envoy xDS protocol.
|
Modifier and Type | Class and Description |
---|---|
class |
Attributes
An immutable type-safe container of attributes.
|
class |
BinaryLog
A binary log that can be installed on a channel or server.
|
static class |
CallCredentials.MetadataApplier
The outlet of the produced headers.
|
static class |
CallCredentials.RequestInfo
The request-related information passed to
CallCredentials.applyRequestMetadata() . |
class |
ChannelLogger
A Channel-specific logger provided by GRPC library to
LoadBalancer implementations. |
class |
ClientStreamTracer
StreamTracer for the client-side. |
static class |
ClientStreamTracer.StreamInfo
Information about a stream.
|
interface |
Codec
Encloses classes related to the compression and decompression of messages.
|
class |
CompositeCallCredentials
Uses multiple
CallCredentials as if they were one. |
interface |
Compressor
Represents a message compressor.
|
class |
CompressorRegistry
Encloses classes related to the compression and decompression of messages.
|
class |
ConnectivityState
The connectivity states.
|
class |
ConnectivityStateInfo
A tuple of a
ConnectivityState and its associated Status . |
interface |
Decompressor
Represents a message decompressor.
|
class |
DecompressorRegistry
Encloses classes related to the compression and decompression of messages.
|
interface |
Detachable
An extension of
InputStream that allows the underlying data source to be detached and
transferred to a new instance of the same kind. |
class |
EquivalentAddressGroup
A group of
SocketAddress es that are considered equivalent when channel makes connections. |
static interface |
EquivalentAddressGroup.Attr
Annotation for
EquivalentAddressGroup 's attributes. |
class |
ForwardingChannelBuilder<T extends ForwardingChannelBuilder<T>>
A
ManagedChannelBuilder that delegates all its builder methods to another builder by
default. |
class |
ForwardingServerBuilder<T extends ServerBuilder<T>>
A
ServerBuilder that delegates all its builder methods to another builder by default. |
static interface |
Grpc.TransportAttr
Annotation for transport attributes.
|
interface |
HasByteBuffer
Extension to an
InputStream whose content can be accessed as ByteBuffer s. |
class |
HttpConnectProxiedSocketAddress
An
ProxiedSocketAddress for making a connection to an endpoint via an HTTP CONNECT proxy. |
class |
LoadBalancer
A pluggable component that receives resolved addresses from
NameResolver and provides the
channel a usable subchannel when asked. |
static class |
LoadBalancer.CreateSubchannelArgs
Arguments for creating a
LoadBalancer.Subchannel . |
static class |
LoadBalancer.CreateSubchannelArgs.Builder |
static class |
LoadBalancer.CreateSubchannelArgs.Key<T>
Key for a key-value pair.
|
static class |
LoadBalancer.Factory
Factory to create
LoadBalancer instance. |
static class |
LoadBalancer.Helper
Provides essentials for LoadBalancer implementations.
|
static class |
LoadBalancer.PickResult
A balancing decision made by
SubchannelPicker for an RPC. |
static class |
LoadBalancer.PickSubchannelArgs
Provides arguments for a
LoadBalancer.SubchannelPicker.pickSubchannel(
LoadBalancer.PickSubchannelArgs) . |
static class |
LoadBalancer.ResolvedAddresses
Represents a combination of the resolved server address, associated attributes and a load
balancing policy config.
|
static class |
LoadBalancer.ResolvedAddresses.Builder
Builder for
LoadBalancer.ResolvedAddresses . |
static class |
LoadBalancer.Subchannel
A logical connection to a server, or a group of equivalent servers represented by an
EquivalentAddressGroup . |
static class |
LoadBalancer.SubchannelPicker
The main balancing logic.
|
class |
LoadBalancerProvider
Provider of
LoadBalancer s. |
class |
LoadBalancerRegistry
Registry of
LoadBalancerProvider s. |
static interface |
Metadata.BinaryStreamMarshaller<T>
Marshaller for metadata values that are serialized to an InputStream.
|
static interface |
MethodDescriptor.PrototypeMarshaller<T>
A marshaller that uses a fixed instance of the type it produces.
|
static interface |
MethodDescriptor.ReflectableMarshaller<T>
A marshaller that supports retrieving it's type parameter
T at runtime. |
class |
NameResolver
A pluggable component that resolves a target
URI and return addresses to the caller. |
static class |
NameResolver.Args
Information that a
NameResolver.Factory uses to create a NameResolver . |
static class |
NameResolver.ConfigOrError
Represents either a successfully parsed service config, containing all necessary parts to be
later applied by the channel, or a Status containing the error encountered while parsing.
|
static class |
NameResolver.Factory
Factory that creates
NameResolver instances. |
static interface |
NameResolver.Listener
Receives address updates.
|
static class |
NameResolver.Listener2
Receives address updates.
|
static class |
NameResolver.ResolutionResult
Represents the results from a Name Resolver.
|
static class |
NameResolver.ResolutionResult.Builder
A builder for
NameResolver.ResolutionResult . |
static interface |
NameResolver.ResolutionResultAttr
Annotation for name resolution result attributes.
|
static class |
NameResolver.ServiceConfigParser
Parses and validates service configuration.
|
class |
NameResolverProvider
Provider of name resolvers for name agnostic consumption.
|
class |
NameResolverRegistry
Registry of
NameResolverProvider s. |
class |
ProxiedSocketAddress
An address that contains the information about making a connection via a proxy.
|
interface |
ProxyDetector
A utility class to detect which proxy, if any, should be used for a given
SocketAddress . |
class |
SecurityLevel
The level of security guarantee in communications.
|
interface |
ServerCallExecutorSupplier
Defines what executor handles the server call, based on each RPC call information at runtime.
|
class |
ServerStreamTracer
Listens to events on a stream to collect metrics.
|
class |
ServerTransportFilter
Listens on server transport life-cycle events, with the capability to read and/or change
transport attributes.
|
class |
StreamTracer
Listens to events on a stream to collect metrics.
|
class |
SynchronizationContext
A synchronization context is a queue of tasks that run in sequence.
|
Modifier and Type | Field and Description |
---|---|
static Attributes.Key<String> |
EquivalentAddressGroup.ATTR_AUTHORITY_OVERRIDE
The authority to be used when constructing Subchannels for this EquivalentAddressGroup.
|
static Attributes.Key<SocketAddress> |
Grpc.TRANSPORT_ATTR_LOCAL_ADDR
Attribute key for the local address of a transport.
|
static Attributes.Key<SocketAddress> |
Grpc.TRANSPORT_ATTR_REMOTE_ADDR
Attribute key for the remote address of a transport.
|
static Attributes.Key<SSLSession> |
Grpc.TRANSPORT_ATTR_SSL_SESSION
Attribute key for SSL session of a transport.
|
Modifier and Type | Method and Description |
---|---|
T |
ServerBuilder.addServices(List<ServerServiceDefinition> services)
Adds a list of service implementations to the handler registry together.
|
T |
ServerBuilder.addStreamTracerFactory(ServerStreamTracer.Factory factory)
Adds a
ServerStreamTracer.Factory to measure server-side traffic. |
T |
ServerBuilder.addTransportFilter(ServerTransportFilter filter)
Adds a
ServerTransportFilter . |
StatusRuntimeException |
Status.asRuntimeException(Metadata trailers)
Same as
Status.asRuntimeException() but includes the provided trailers in the returned
exception. |
T |
ServerBuilder.callExecutor(ServerCallExecutorSupplier executorSupplier)
Allows for defining a way to provide a custom executor to handle the server call.
|
abstract T |
ServerBuilder.compressorRegistry(CompressorRegistry registry)
Set the compression registry for use in the channel.
|
abstract T |
ManagedChannelBuilder.compressorRegistry(CompressorRegistry registry)
Set the compression registry for use in the channel.
|
abstract T |
ServerBuilder.decompressorRegistry(DecompressorRegistry registry)
Set the decompression registry for use in the channel.
|
abstract T |
ManagedChannelBuilder.decompressorRegistry(DecompressorRegistry registry)
Set the decompression registry for use in the channel.
|
T |
ManagedChannelBuilder.defaultLoadBalancingPolicy(String policy)
Sets the default load-balancing policy that will be used if the service config doesn't specify
one.
|
T |
ManagedChannelBuilder.defaultServiceConfig(Map<String,?> serviceConfig)
Provides a service config to the channel.
|
T |
ManagedChannelBuilder.disableServiceConfigLookUp()
Disables service config look-up from the naming system, which is enabled by default.
|
<T> Attributes.Builder |
Attributes.Builder.discard(Attributes.Key<T> key)
Removes the key and associated value from the attribtues.
|
<T> void |
Metadata.discardAll(Metadata.Key<T> key)
Remove all values for the given key without returning them.
|
T |
ManagedChannelBuilder.enableFullStreamDecompression()
Enables full-stream decompression of inbound streams.
|
void |
ManagedChannel.enterIdle()
Invoking this method moves the channel into the IDLE state and triggers tear-down of the
channel's name resolver and load balancer, while still allowing on-going RPCs on the channel to
continue.
|
static String |
MethodDescriptor.extractBareMethodName(String fullMethodName)
Extract the method name out of a fully qualified method name.
|
Set<String> |
DecompressorRegistry.getAdvertisedMessageEncodings()
Provides a list of all message encodings that have decompressors available and should be
advertised.
|
Attributes |
ClientCall.getAttributes()
Returns additional properties of the call.
|
Attributes |
ServerCall.getAttributes()
Returns properties of a single call.
|
String |
CallOptions.getAuthority()
Override the HTTP/2 authority the channel claims to be connecting to.
|
String |
ServerCall.getAuthority()
Gets the authority this call is addressed to.
|
String |
MethodDescriptor.getBareMethodName()
A convenience method for
extractBareMethodName(getFullMethodName()) . |
ChannelLogger |
NameResolver.Args.getChannelLogger()
Returns the
ChannelLogger for the Channel served by this NameResolver. |
String |
CallOptions.getCompressor()
Returns the compressor's name.
|
List<ServerServiceDefinition> |
Server.getImmutableServices()
Returns immutable services registered with the server, or an empty list if not supported by the
implementation.
|
List<? extends SocketAddress> |
Server.getListenSockets()
Returns a list of listening sockets for this server.
|
Integer |
CallOptions.getMaxInboundMessageSize()
Gets the maximum allowed message size acceptable from the remote peer.
|
Integer |
CallOptions.getMaxOutboundMessageSize()
Gets the maximum allowed message size acceptable to send the remote peer.
|
List<ServerServiceDefinition> |
Server.getMutableServices()
Returns mutable services registered with the server, or an empty list if not supported by the
implementation.
|
Executor |
NameResolver.Args.getOffloadExecutor()
Returns the Executor on which this resolver should execute long-running or I/O bound work.
|
<T> T |
CallOptions.getOption(CallOptions.Key<T> key)
Get the value for a custom option or its inherent default.
|
MethodDescriptor.Marshaller<ReqT> |
MethodDescriptor.getRequestMarshaller()
Returns the marshaller for the request type.
|
MethodDescriptor.Marshaller<RespT> |
MethodDescriptor.getResponseMarshaller()
Returns the marshaller for the response type.
|
ScheduledExecutorService |
NameResolver.Args.getScheduledExecutorService()
Returns a
ScheduledExecutorService for scheduling delayed tasks. |
Object |
ServiceDescriptor.getSchemaDescriptor()
Returns the schema descriptor for this service.
|
SecurityLevel |
ServerCall.getSecurityLevel()
Returns the level of security guarantee in communications
|
String |
MethodDescriptor.getServiceName()
A convenience method for
extractFullServiceName(getFullMethodName()) . |
List<ServerServiceDefinition> |
Server.getServices()
Returns all services registered with the server, or an empty list if not supported by the
implementation.
|
List<ServerServiceDefinition> |
HandlerRegistry.getServices()
Returns the
ServerServiceDefinition s provided by the registry, or an empty list if not
supported by the implementation. |
ConnectivityState |
ManagedChannel.getState(boolean requestConnection)
Gets the current connectivity state.
|
List<ClientStreamTracer.Factory> |
CallOptions.getStreamTracerFactories()
Returns an immutable list of
ClientStreamTracerFactory s. |
T |
ServerBuilder.handshakeTimeout(long timeout,
TimeUnit unit)
Sets the permitted time for new connections to complete negotiation handshakes before being
killed.
|
abstract T |
ManagedChannelBuilder.idleTimeout(long value,
TimeUnit unit)
Set the duration without ongoing RPCs before going to idle mode.
|
void |
LoadBalancer.Helper.ignoreRefreshNameResolutionCheck()
Historically the channel automatically refreshes name resolution if any subchannel
connection is broken.
|
T |
ServerBuilder.intercept(ServerInterceptor interceptor)
Adds a
ServerInterceptor that is run for all services on the server. |
T |
ServerBuilder.keepAliveTime(long keepAliveTime,
TimeUnit timeUnit)
Sets the time without read activity before sending a keepalive ping.
|
T |
ServerBuilder.keepAliveTimeout(long keepAliveTimeout,
TimeUnit timeUnit)
Sets a time waiting for read activity after sending a keepalive ping.
|
T |
ServerBuilder.maxConnectionAge(long maxConnectionAge,
TimeUnit timeUnit)
Sets the maximum connection age, connections lasting longer than which will be gracefully
terminated.
|
T |
ServerBuilder.maxConnectionAgeGrace(long maxConnectionAgeGrace,
TimeUnit timeUnit)
Sets the grace time for the graceful connection termination.
|
T |
ServerBuilder.maxConnectionIdle(long maxConnectionIdle,
TimeUnit timeUnit)
Sets the maximum connection idle time, connections being idle for longer than which will be
gracefully terminated.
|
T |
ManagedChannelBuilder.maxHedgedAttempts(int maxHedgedAttempts)
Sets the maximum number of hedged attempts that may be configured by the service config.
|
T |
ManagedChannelBuilder.maxRetryAttempts(int maxRetryAttempts)
Sets the maximum number of retry attempts that may be configured by the service config.
|
T |
ManagedChannelBuilder.maxTraceEvents(int maxTraceEvents)
Sets the maximum number of channel trace events to keep in the tracer for each channel or
subchannel.
|
abstract T |
ManagedChannelBuilder.nameResolverFactory(NameResolver.Factory resolverFactory)
Deprecated.
Most usages should use a globally-registered
NameResolverProvider instead,
with either the SPI mechanism or NameResolverRegistry.register(io.grpc.NameResolverProvider) . Replacements for
all use-cases are not necessarily available yet. See
#7133. |
void |
ManagedChannel.notifyWhenStateChanged(ConnectivityState source,
Runnable callback)
Registers a one-off callback that will be run if the connectivity state of the channel diverges
from the given
source , which is typically what has just been returned by ManagedChannel.getState(boolean) . |
static <T> Metadata.Key<T> |
Metadata.Key.of(String name,
Metadata.BinaryStreamMarshaller<T> marshaller)
Creates a key for a binary header, serializing to input streams.
|
static <T> CallOptions.Key<T> |
CallOptions.Key.of(String debugString,
T defaultValue)
Deprecated.
Use
CallOptions.Key.create(java.lang.String) or CallOptions.Key.createWithDefault(java.lang.String, T) instead. This method will
be removed. |
T |
ManagedChannelBuilder.offloadExecutor(Executor executor)
Provides a custom executor that will be used for operations that block or are expensive.
|
T |
ServerBuilder.permitKeepAliveTime(long keepAliveTime,
TimeUnit timeUnit)
Specify the most aggressive keep-alive time clients are permitted to configure.
|
T |
ServerBuilder.permitKeepAliveWithoutCalls(boolean permit)
Sets whether to allow clients to send keep-alive HTTP/2 PINGs even if there are no outstanding
RPCs on the connection.
|
T |
ManagedChannelBuilder.perRpcBufferLimit(long bytes)
Sets the per RPC buffer limit in bytes used for retry.
|
T |
ManagedChannelBuilder.proxyDetector(ProxyDetector proxyDetector)
Sets the proxy detector to be used in addresses name resolution.
|
void |
ManagedChannel.resetConnectBackoff()
For subchannels that are in TRANSIENT_FAILURE state, short-circuit the backoff timer and make
them reconnect immediately.
|
T |
ManagedChannelBuilder.retryBufferSize(long bytes)
Sets the retry buffer size in bytes.
|
T |
ServerBuilder.setBinaryLog(BinaryLog binaryLog)
Sets the BinaryLog object that this server should log to.
|
T |
ManagedChannelBuilder.setBinaryLog(BinaryLog binaryLog)
Sets the BinaryLog object that this channel should log to.
|
NameResolver.Args.Builder |
NameResolver.Args.Builder.setChannelLogger(ChannelLogger channelLogger)
|
void |
ServerCall.setCompression(String compressor)
Sets the compression algorithm for this call.
|
void |
ClientCall.setMessageCompression(boolean enabled)
Enables per-message compression, if an encoding type has been negotiated.
|
void |
ServerCall.setMessageCompression(boolean enabled)
Enables per-message compression, if an encoding type has been negotiated.
|
ServiceDescriptor.Builder |
ServiceDescriptor.Builder.setName(String name)
Sets the name.
|
NameResolver.Args.Builder |
NameResolver.Args.Builder.setOffloadExecutor(Executor executor)
|
NameResolver.Args.Builder |
NameResolver.Args.Builder.setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
|
static Status |
Contexts.statusFromCancelled(Context context)
Returns the
Status of a cancelled context or null if the context
is not cancelled. |
abstract void |
CallCredentials.thisUsesUnstableApi()
Should be a noop but never called; tries to make it clearer to implementors that they may break
in the future.
|
static Metadata |
Status.trailersFromThrowable(Throwable t)
Extract an error trailers from the causal chain of a
Throwable . |
static ServerServiceDefinition |
ServerInterceptors.useInputStreamMessages(ServerServiceDefinition serviceDef)
Create a new
ServerServiceDefinition whose MethodDescriptor serializes to
and from InputStream for all methods. |
static <T> ServerServiceDefinition |
ServerInterceptors.useMarshalledMessages(ServerServiceDefinition serviceDef,
MethodDescriptor.Marshaller<T> marshaller)
Create a new
ServerServiceDefinition whose MethodDescriptor serializes to
and from T for all methods. |
T |
ManagedChannelBuilder.useTransportSecurity()
Makes the client use TLS.
|
CallOptions |
CallOptions.withAuthority(String authority)
Override the HTTP/2 authority the channel claims to be connecting to.
|
CallOptions |
CallOptions.withCompression(String compressorName)
Sets the compression to use for the call.
|
CallOptions |
CallOptions.withMaxInboundMessageSize(int maxSize)
Sets the maximum allowed message size acceptable from the remote peer.
|
CallOptions |
CallOptions.withMaxOutboundMessageSize(int maxSize)
Sets the maximum allowed message size acceptable sent to the remote peer.
|
CallOptions |
CallOptions.withStreamTracerFactory(ClientStreamTracer.Factory factory)
Returns a new
CallOptions with a ClientStreamTracerFactory in addition to
the existing factories. |
Modifier and Type | Class and Description |
---|---|
class |
GrpclbConstants
Constants for the GRPCLB load-balancer.
|
Modifier and Type | Class and Description |
---|---|
class |
AnonymousInProcessSocketAddress
Custom SocketAddress class for
InProcessTransport , for
a server which can only be referenced via this address instance. |
class |
InProcessChannelBuilder
Builder for a channel that issues in-process requests.
|
class |
InProcessServerBuilder
Builder for a server that services in-process requests.
|
Modifier and Type | Class and Description |
---|---|
class |
GrpcSslContexts
Utility for configuring SslContext for gRPC.
|
class |
InsecureFromHttp1ChannelCredentials
An insecure credential that upgrades from HTTP/1 to HTTP/2.
|
class |
NegotiationType
Identifies the negotiation used for starting up HTTP/2.
|
class |
NettyChannelBuilder
A builder to help simplify construction of channels using the Netty transport.
|
static class |
NettyChannelBuilder.LocalSocketPicker
This class is meant to be overriden with a custom implementation of
NettyChannelBuilder.LocalSocketPicker.createSocketAddress(java.net.SocketAddress, io.grpc.Attributes) . |
class |
NettyServerBuilder
A builder to help simplify the construction of a Netty-based GRPC server.
|
class |
NettySslContextChannelCredentials
A credential that performs TLS with Netty's SslContext as configuration.
|
class |
NettySslContextServerCredentials
A credential that performs TLS with Netty's SslContext as configuration.
|
Modifier and Type | Method and Description |
---|---|
static io.netty.handler.ssl.SslContextBuilder |
GrpcSslContexts.configure(io.netty.handler.ssl.SslContextBuilder builder,
io.netty.handler.ssl.SslProvider provider)
Set ciphers and APN appropriate for gRPC.
|
Modifier and Type | Class and Description |
---|---|
class |
OkHttpChannelBuilder
Convenience class for building channels with the OkHttp transport.
|
class |
SslSocketFactoryChannelCredentials
A credential with full control over the SSLSocketFactory.
|
Modifier and Type | Class and Description |
---|---|
class |
StatusProto
Utility methods for working with
Status . |
Modifier and Type | Method and Description |
---|---|
static <T extends Message> |
ProtoUtils.metadataMarshaller(T instance)
Produce a metadata marshaller for a protobuf type.
|
static void |
ProtoUtils.setExtensionRegistry(ExtensionRegistry registry)
Sets the global registry for proto marshalling shared across all servers and clients.
|
Modifier and Type | Class and Description |
---|---|
class |
ProtoLiteUtils
Utility methods for using protobuf with grpc.
|
Modifier and Type | Method and Description |
---|---|
static void |
ProtoLiteUtils.setExtensionRegistry(ExtensionRegistryLite newRegistry)
Sets the global registry for proto marshalling shared across all servers and clients.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryLogs |
interface |
BinaryLogSink
A class that accepts binary log messages.
|
class |
ChannelzService
The channelz service provides stats about a running gRPC process.
|
class |
HealthCheckingLoadBalancerUtil
Utility for enabling
client-side health checking for
LoadBalancer s. |
class |
HealthStatusManager
A
HealthStatusManager object manages a health check service. |
class |
ProtoReflectionService
Provides a reflection service for Protobuf services (including the reflection service itself).
|
Modifier and Type | Class and Description |
---|---|
class |
AdminInterface
Admin Interface provides a class of services for exposing the overall state of gRPC
activity in a given binary.
|
class |
BinaryLogs
Deprecated.
Use
BinaryLogs instead. |
class |
CallMetricRecorder
Utility to record call metrics for load-balancing.
|
class |
ChannelzService
Deprecated.
Use
ChannelzService instead. |
class |
HealthStatusManager
Deprecated.
Use
HealthStatusManager instead. |
class |
MetricRecorder
Implements the service/APIs for Out-of-Band metrics reporting, only for utilization metrics.
|
class |
MetricReport
A gRPC object of orca load report.
|
Modifier and Type | Class and Description |
---|---|
class |
CallStreamObserver<V>
A refinement of StreamObserver provided by the GRPC runtime to the application (the client or
the server) that allows for more complex interactions with call behavior.
|
class |
StreamObservers
Utility functions for working with
StreamObserver and it's common subclasses like
CallStreamObserver . |
Modifier and Type | Method and Description |
---|---|
static <T extends AbstractStub<T>> |
MetadataUtils.attachHeaders(T stub,
Metadata extraHeaders)
Deprecated.
Use
stub.withInterceptors(newAttachHeadersInterceptor(...)) instead. |
static <T extends AbstractStub<T>> |
MetadataUtils.captureMetadata(T stub,
AtomicReference<Metadata> headersCapture,
AtomicReference<Metadata> trailersCapture)
Deprecated.
Use
stub.withInterceptors(newCaptureMetadataInterceptor()) instead. |
void |
ServerCallStreamObserver.setOnCloseHandler(Runnable onCloseHandler)
Sets a
Runnable to be executed when the call is closed cleanly from the server's
point of view: either StreamObserver.onCompleted() or StreamObserver.onError(Throwable) has been called,
all the messages and trailing metadata have been sent and the stream has been closed. |
S |
AbstractStub.withCompression(String compressorName)
Set's the compressor name to use for the call.
|
S |
AbstractStub.withMaxInboundMessageSize(int maxSize)
Returns a new stub that limits the maximum acceptable message size from a remote peer.
|
S |
AbstractStub.withMaxOutboundMessageSize(int maxSize)
Returns a new stub that limits the maximum acceptable message size to send a remote peer.
|
<T> S |
AbstractStub.withOption(CallOptions.Key<T> key,
T value)
Sets a custom option to be passed to client interceptors on the channel
ClientInterceptor via the CallOptions parameter. |
Modifier and Type | Class and Description |
---|---|
class |
GrpcCleanupRule
A JUnit
ExternalResource that can register gRPC resources and manages its automatic
release at the end of the test. |
class |
GrpcServerRule
GrpcServerRule is a JUnit TestRule that starts an in-process gRPC service with
a MutableHandlerRegistry for adding services. |
class |
StreamRecorder<T>
Deprecated.
Not for public use
|
class |
TestMethodDescriptors
A collection of method descriptor constructors useful for tests.
|
class |
TestUtils
Common utility functions useful for writing tests.
|
class |
TlsTesting
Convenience utilities for using TLS in tests.
|
Modifier and Type | Method and Description |
---|---|
static MethodDescriptor.Marshaller<Void> |
TestMethodDescriptors.voidMarshaller()
Creates a new marshaller that does nothing.
|
static MethodDescriptor<Void,Void> |
TestMethodDescriptors.voidMethod()
Creates a new method descriptor that always creates zero length messages, and always parses to
null objects.
|
Modifier and Type | Class and Description |
---|---|
class |
AdvancedTlsX509KeyManager
AdvancedTlsX509KeyManager is an
X509ExtendedKeyManager that allows users to configure
advanced TLS features, such as private key and certificate chain reloading, etc. |
class |
AdvancedTlsX509TrustManager
AdvancedTlsX509TrustManager is an
X509ExtendedTrustManager that allows users to configure
advanced TLS features, such as root certificate reloading, peer cert custom verification, etc. |
class |
CertificateUtils
Contains certificate/key PEM file utility method(s).
|
class |
ForwardingClientStreamTracer |
class |
ForwardingLoadBalancer |
class |
ForwardingLoadBalancerHelper |
class |
ForwardingSubchannel |
class |
GracefulSwitchLoadBalancer
A load balancer that gracefully swaps to a new lb policy.
|
class |
MutableHandlerRegistry
Default implementation of
MutableHandlerRegistry . |
class |
TransmitStatusRuntimeExceptionInterceptor
A class that intercepts uncaught exceptions of type
StatusRuntimeException and handles
them by closing the ServerCall , and transmitting the exception's status and metadata
to the client. |
Modifier and Type | Method and Description |
---|---|
List<ServerServiceDefinition> |
MutableHandlerRegistry.getServices()
Note: This does not necessarily return a consistent view of the map.
|
Modifier and Type | Class and Description |
---|---|
class |
CsdsService
The CSDS service provides information about the status of a running xDS client.
|
class |
XdsChannelCredentials |
class |
XdsServerBuilder
A version of
ServerBuilder to create xDS managed servers. |
class |
XdsServerCredentials |
Modifier and Type | Class and Description |
---|---|
class |
OrcaMetricReportingServerInterceptor
A
ServerInterceptor that intercepts a ServerCall by running server-side RPC
handling under a Context that records custom per-request metrics provided by server
applications and sends to client side along with the response in the format of Open Request
Cost Aggregation (ORCA). |
class |
OrcaOobUtil
Utility class that provides method for
LoadBalancer to install listeners to receive
out-of-band backend metrics in the format of Open Request Cost Aggregation (ORCA). |
class |
OrcaPerRequestUtil
Utility class that provides method for
LoadBalancer to install listeners to receive
per-request backend cost metrics in the format of Open Request Cost Aggregation (ORCA). |