| Package | Description |
|---|---|
| io.grpc |
The gRPC core public API.
|
| io.grpc.inprocess |
The in-process transport which is for when a server is in the same process as the client.
|
| io.grpc.util |
Utilities with advanced features in the core layer that user can optionally use.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Attributes
An immutable type-safe container of attributes.
|
static interface |
CallCredentials.MetadataApplier
The outlet of the produced headers.
|
static class |
CallOptions.Key<T>
Key for a key-value pair.
|
class |
ClientStreamTracer
StreamTracer for the client-side. |
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
SocketAddresses that are considered equivalent when channel makes connections. |
class |
HandlerRegistry
Registry of services and their methods used by servers to dispatching incoming calls.
|
class |
LoadBalancer
A pluggable component that receives resolved addresses from
NameResolver and provides the
channel a usable subchannel when asked. |
static interface |
MethodDescriptor.Marshaller<T>
A typed abstraction over message serialization and deserialization, a.k.a.
|
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. |
class |
NameResolverProvider
Provider of name resolvers for name agnostic consumption.
|
class |
PickFirstBalancerFactory
A
LoadBalancer that provides no load balancing mechanism over the
addresses from the NameResolver. |
class |
ResolvedServerInfo
Deprecated.
This class will be removed along with
ResolvedServerInfoGroup. |
class |
ResolvedServerInfoGroup
Deprecated.
This class will be removed. Use
EquivalentAddressGroup instead. |
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.
|
| Modifier and Type | Field and Description |
|---|---|
static Attributes.Key<String> |
CallCredentials.ATTR_AUTHORITY
The authority string used to authenticate the server.
|
static Attributes.Key<SecurityLevel> |
CallCredentials.ATTR_SECURITY_LEVEL
The security level of the 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.addStreamTracerFactory(ServerStreamTracer.Factory factory)
Adds a
ServerStreamTracer.Factory to measure server-side traffic. |
T |
ServerBuilder.addTransportFilter(ServerTransportFilter filter)
Adds a
ServerTransportFilter. |
void |
CallCredentials.applyRequestMetadata(MethodDescriptor<?,?> method,
Attributes attrs,
Executor appExecutor,
CallCredentials.MetadataApplier applier)
Pass the credential data to the given
CallCredentials.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. |
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> void |
Metadata.discardAll(Metadata.Key<T> key)
Remove all values for the given key without returning them.
|
abstract T |
ServerBuilder.fallbackHandlerRegistry(HandlerRegistry fallbackRegistry)
Sets a fallback handler registry that will be looked up in if a method is not found in the
primary registry.
|
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 |
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.
|
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.
|
<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.
|
Object |
ServiceDescriptor.getSchemaDescriptor()
Returns the schema descriptor for this service.
|
List<ServerServiceDefinition> |
HandlerRegistry.getServices()
Returns the
ServerServiceDefinitions provided by the registry, or an empty list if not
supported by the implementation. |
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.
|
List<ClientStreamTracer.Factory> |
CallOptions.getStreamTracerFactories()
Returns an immutable list of
ClientStreamTracerFactorys. |
Metadata |
StatusException.getTrailers()
Returns the received trailers.
|
Metadata |
StatusRuntimeException.getTrailers()
Returns the received trailers.
|
abstract T |
ManagedChannelBuilder.idleTimeout(long value,
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. |
boolean |
MethodDescriptor.isIdempotent()
Returns whether this method is idempotent.
|
boolean |
MethodDescriptor.isSafe()
Returns whether this method is safe.
|
abstract T |
ManagedChannelBuilder.loadBalancerFactory(LoadBalancer.Factory loadBalancerFactory)
Provides a custom
LoadBalancer.Factory for the channel. |
T |
ManagedChannelBuilder.maxInboundMessageSize(int max)
Sets the maximum message size allowed to be received on the channel.
|
abstract T |
ManagedChannelBuilder.nameResolverFactory(NameResolver.Factory resolverFactory)
Provides a custom
NameResolver.Factory for the channel. |
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). |
abstract T |
ManagedChannelBuilder.overrideAuthority(String authority)
Overrides the authority used with TLS and HTTP virtual hosting.
|
void |
ServerCall.setCompression(String compressor)
Sets the compression algorithm for this call.
|
MethodDescriptor.Builder<ReqT,RespT> |
MethodDescriptor.Builder.setIdempotent(boolean idempotent)
Sets whether the method is idempotent.
|
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.
|
MethodDescriptor.Builder<ReqT,RespT> |
MethodDescriptor.Builder.setSafe(boolean safe)
Sets whether this method is safe.
|
static Status |
Contexts.statusFromCancelled(io.grpc.Context context)
Returns the
Status of a cancelled context or null if the context
is not cancelled. |
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. |
abstract T |
ManagedChannelBuilder.usePlaintext(boolean skipNegotiation)
Use of a plaintext connection to the server.
|
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.
|
<T> CallOptions |
CallOptions.withOption(CallOptions.Key<T> key,
T value)
Sets a custom option.
|
CallOptions |
CallOptions.withStreamTracerFactory(ClientStreamTracer.Factory factory)
Returns a new
CallOptions with a ClientStreamTracerFactory in addition to
the existing factories. |
| Constructor and Description |
|---|
StatusException(Status status,
Metadata trailers)
Constructs an exception with both a status and trailers.
|
StatusRuntimeException(Status status,
Metadata trailers)
Constructs the exception with both a status and trailers.
|
| Modifier and Type | Class and Description |
|---|---|
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 |
MutableHandlerRegistry
Default implementation of
MutableHandlerRegistry. |
class |
RoundRobinLoadBalancerFactory
A
LoadBalancer that provides round-robin load balancing mechanism over the
addresses from the NameResolver. |
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.
|