Modifier and Type | Class | 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
CallCredentials2.applyRequestMetadata() . |
class |
CallCredentials2 |
Deprecated.
the new interface has been promoted into
CallCredentials . |
static class |
CallCredentials2.MetadataApplier |
Deprecated.
|
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.
|
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.
|
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 method to another builder by
default. |
static interface |
Grpc.TransportAttr |
Annotation for transport attributes.
|
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 |
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 |
Gets the attributes associated with the addresses resolved by name resolution.
|
static class |
NameResolver.Factory |
Factory that creates
NameResolver instances. |
static class |
NameResolver.Helper |
Deprecated.
use
NameResolver.Args instead. |
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.
|
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 | Description |
---|---|---|
static Attributes.Key<java.lang.String> |
EquivalentAddressGroup.ATTR_AUTHORITY_OVERRIDE |
The authority to be used when constructing Subchannels for this EquivalentAddressGroup.
|
static Attributes.Key<ProxyDetector> |
NameResolver.Factory.PARAMS_PROXY_DETECTOR |
Deprecated.
this will be deleted along with
NameResolver.Factory.newNameResolver(URI, Attributes) in
a future release |
static Attributes.Key<java.net.SocketAddress> |
Grpc.TRANSPORT_ATTR_LOCAL_ADDR |
Attribute key for the local address of a transport.
|
static Attributes.Key<java.net.SocketAddress> |
Grpc.TRANSPORT_ATTR_REMOTE_ADDR |
Attribute key for the remote address of a transport.
|
static Attributes.Key<javax.net.ssl.SSLSession> |
Grpc.TRANSPORT_ATTR_SSL_SESSION |
Attribute key for SSL session of a transport.
|
Modifier and Type | Method | Description |
---|---|---|
T |
ServerBuilder.addStreamTracerFactory(ServerStreamTracer.Factory factory) |
Adds a
ServerStreamTracer.Factory to measure server-side traffic. |
T |
ServerBuilder.addTransportFilter(ServerTransportFilter filter) |
Adds a
ServerTransportFilter . |
abstract void |
CallCredentials2.applyRequestMetadata(CallCredentials.RequestInfo requestInfo,
java.util.concurrent.Executor appExecutor,
CallCredentials2.MetadataApplier applier) |
Deprecated.
Pass the credential data to the given
CallCredentials2.MetadataApplier , which will propagate it to the
request metadata. |
StatusException |
Status.asException(Metadata trailers) |
Same as
Status.asException() but includes the provided trailers in the returned exception. |
StatusRuntimeException |
Status.asRuntimeException(Metadata trailers) |
Same as
Status.asRuntimeException() but includes the provided trailers in the returned
exception. |
T |
ManagedChannelBuilder.blockingExecutor(java.util.concurrent.Executor executor) |
Deprecated.
|
abstract T |
ManagedChannelBuilder.compressorRegistry(CompressorRegistry registry) |
Set the compression registry for use in the channel.
|
abstract T |
ServerBuilder.compressorRegistry(CompressorRegistry registry) |
Set the compression registry for use in the channel.
|
abstract T |
ManagedChannelBuilder.decompressorRegistry(DecompressorRegistry registry) |
Set the decompression registry for use in the channel.
|
abstract T |
ServerBuilder.decompressorRegistry(DecompressorRegistry registry) |
Set the decompression registry for use in the channel.
|
T |
ManagedChannelBuilder.defaultLoadBalancingPolicy(java.lang.String policy) |
Sets the default load-balancing policy that will be used if the service config doesn't specify
one.
|
T |
ManagedChannelBuilder.defaultServiceConfig(java.util.Map<java.lang.String,?> serviceConfig) |
Provides a service config to the channel.
|
T |
ManagedChannelBuilder.disableRetry() |
Disables the retry and hedging mechanism provided by the gRPC library.
|
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.
|
T |
ManagedChannelBuilder.enableRetry() |
Enables the retry and hedging mechanism provided by the gRPC library.
|
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.
|
java.util.Set<java.lang.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.
|
java.lang.String |
CallOptions.getAuthority() |
Override the HTTP/2 authority the channel claims to be connecting to.
|
java.lang.String |
ServerCall.getAuthority() |
Gets the authority this call is addressed to.
|
java.lang.String |
CallOptions.getCompressor() |
Returns the compressor's name.
|
java.util.List<ServerServiceDefinition> |
Server.getImmutableServices() |
Returns immutable services registered with the server, or an empty list if not supported by the
implementation.
|
java.util.List<? extends java.net.SocketAddress> |
Server.getListenSockets() |
Returns a list of listening sockets for this server.
|
java.lang.Integer |
CallOptions.getMaxInboundMessageSize() |
Gets the maximum allowed message size acceptable from the remote peer.
|
java.lang.Integer |
CallOptions.getMaxOutboundMessageSize() |
Gets the maximum allowed message size acceptable to send the remote peer.
|
java.util.List<ServerServiceDefinition> |
Server.getMutableServices() |
Returns mutable services registered with the server, or an empty list if not supported by the
implementation.
|
java.util.concurrent.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.
|
java.lang.Object |
ServiceDescriptor.getSchemaDescriptor() |
Returns the schema descriptor for this service.
|
java.lang.String |
MethodDescriptor.getServiceName() |
A convenience method for
extractFullServiceName(getFullMethodName()) . |
java.util.List<ServerServiceDefinition> |
HandlerRegistry.getServices() |
Returns the
ServerServiceDefinition s provided by the registry, or an empty list if not
supported by the implementation. |
java.util.List<ServerServiceDefinition> |
Server.getServices() |
Returns all services registered with the server, or an empty list if not supported by the
implementation.
|
ConnectivityState |
ManagedChannel.getState(boolean requestConnection) |
Gets the current connectivity state.
|
java.util.List<ClientStreamTracer.Factory> |
CallOptions.getStreamTracerFactories() |
Returns an immutable list of
ClientStreamTracerFactory s. |
T |
ServerBuilder.handshakeTimeout(long timeout,
java.util.concurrent.TimeUnit unit) |
Sets the permitted time for new connections to complete negotiation handshakes before being
killed.
|
abstract T |
ManagedChannelBuilder.idleTimeout(long value,
java.util.concurrent.TimeUnit unit) |
Set the duration without ongoing RPCs before going to idle mode.
|
T |
ServerBuilder.intercept(ServerInterceptor interceptor) |
Adds a
ServerInterceptor that is run for all services on the server. |
T |
ManagedChannelBuilder.maxHedgedAttempts(int maxHedgedAttempts) |
Sets max number of hedged attempts.
|
T |
ManagedChannelBuilder.maxRetryAttempts(int maxRetryAttempts) |
Sets max number of retry attempts.
|
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) |
Provides a custom
NameResolver.Factory for the channel. |
void |
ManagedChannel.notifyWhenStateChanged(ConnectivityState source,
java.lang.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> CallOptions.Key<T> |
CallOptions.Key.of(java.lang.String debugString,
T defaultValue) |
Deprecated.
|
T |
ManagedChannelBuilder.offloadExecutor(java.util.concurrent.Executor executor) |
Provides a custom executor that will be used for operations that block or are expensive.
|
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 |
ManagedChannelBuilder.setBinaryLog(BinaryLog binaryLog) |
Sets the BinaryLog object that this channel should log to.
|
T |
ServerBuilder.setBinaryLog(BinaryLog binaryLog) |
Sets the BinaryLog object that this server should log to.
|
void |
ServerCall.setCompression(java.lang.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(java.lang.String name) |
Sets the name.
|
NameResolver.Args.Builder |
NameResolver.Args.Builder.setOffloadExecutor(java.util.concurrent.Executor executor) |
|
static Status |
Contexts.statusFromCancelled(io.grpc.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(java.lang.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.usePlaintext(boolean skipNegotiation) |
Deprecated.
Use
ManagedChannelBuilder.usePlaintext() instead. |
T |
ManagedChannelBuilder.useTransportSecurity() |
Makes the client use TLS.
|
CallOptions |
CallOptions.withAuthority(java.lang.String authority) |
Override the HTTP/2 authority the channel claims to be connecting to.
|
CallOptions |
CallOptions.withCompression(java.lang.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. |