Package | Description |
---|---|
io.grpc |
The gRPC core public API.
|
io.grpc.protobuf |
API for gRPC over Protocol Buffers, including tools for serializing and de-serializing protobuf
messages.
|
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.orca |
Modifier and Type | Method and Description |
---|---|
abstract Metadata |
LoadBalancer.PickSubchannelArgs.getHeaders()
Headers of the call.
|
Metadata |
StatusRuntimeException.getTrailers()
Returns the received trailers.
|
Metadata |
StatusException.getTrailers()
Returns the received trailers.
|
static Metadata |
Status.trailersFromThrowable(Throwable t)
Extract an error trailers from the causal chain of a
Throwable . |
Modifier and Type | Method and Description |
---|---|
abstract void |
CallCredentials.MetadataApplier.apply(Metadata headers)
Called when headers are successfully generated.
|
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. |
protected abstract void |
ClientInterceptors.CheckedForwardingClientCall.checkedStart(ClientCall.Listener<RespT> responseListener,
Metadata headers)
Subclasses implement the start logic here that would normally belong to
start() . |
abstract void |
ServerCall.close(Status status,
Metadata trailers)
Close the call with the provided status.
|
<ReqT,RespT> |
ServerCallExecutorSupplier.getExecutor(ServerCall<ReqT,RespT> call,
Metadata metadata)
Returns an executor to handle the server call.
|
void |
ClientStreamTracer.inboundTrailers(Metadata trailers)
Trailing metadata has been received from the server.
|
static <ReqT,RespT> |
Contexts.interceptCall(Context context,
ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next)
Make the provided
Context Context.current() for the creation of a listener
to a received call and for all events received by that listener. |
<ReqT,RespT> |
ServerInterceptor.interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next)
|
void |
Metadata.merge(Metadata other)
Perform a simple merge of two sets of metadata.
|
void |
Metadata.merge(Metadata other,
Set<Metadata.Key<?>> keys)
Merge values from the given set of keys into this set of metadata.
|
ClientStreamTracer |
ClientStreamTracer.Factory.newClientStreamTracer(ClientStreamTracer.StreamInfo info,
Metadata headers)
Creates a
ClientStreamTracer for a new client stream. |
abstract ServerStreamTracer |
ServerStreamTracer.Factory.newServerStreamTracer(String fullMethodName,
Metadata headers)
Creates a
ServerStreamTracer for a new server stream. |
void |
ClientCall.Listener.onClose(Status status,
Metadata trailers)
The ClientCall has been closed.
|
void |
ClientCall.Listener.onHeaders(Metadata headers)
The response headers have been received.
|
abstract void |
ServerCall.sendHeaders(Metadata headers)
Send response header metadata prior to sending a response message.
|
abstract void |
ClientCall.start(ClientCall.Listener<RespT> responseListener,
Metadata headers)
Start a call, using
responseListener for processing response messages. |
void |
ClientInterceptors.CheckedForwardingClientCall.start(ClientCall.Listener<RespT> responseListener,
Metadata headers) |
void |
ForwardingClientCall.start(ClientCall.Listener<RespT> responseListener,
Metadata headers) |
ServerCall.Listener<RequestT> |
ServerCallHandler.startCall(ServerCall<RequestT,ResponseT> call,
Metadata headers)
Starts asynchronous processing of an incoming call.
|
void |
ClientStreamTracer.streamCreated(Attributes transportAttrs,
Metadata headers)
The stream is being created on a ready transport.
|
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 | Method and Description |
---|---|
static com.google.rpc.Status |
StatusProto.fromStatusAndTrailers(Status status,
Metadata trailers)
Extracts the
google.rpc.Status from trailers, and makes sure they match the gRPC
status . |
static StatusException |
StatusProto.toStatusException(com.google.rpc.Status statusProto,
Metadata metadata)
Convert a
Status instance to a StatusException with additional
metadata. |
static StatusRuntimeException |
StatusProto.toStatusRuntimeException(com.google.rpc.Status statusProto,
Metadata metadata)
Convert a
Status instance to a StatusRuntimeException with
additional metadata. |
Modifier and Type | Method and Description |
---|---|
static <T extends AbstractStub<T>> |
MetadataUtils.attachHeaders(T stub,
Metadata extraHeaders)
Deprecated.
Use
stub.withInterceptors(newAttachHeadersInterceptor(...)) instead. |
static ClientInterceptor |
MetadataUtils.newAttachHeadersInterceptor(Metadata extraHeaders)
Returns a client interceptor that attaches a set of headers to requests.
|
Modifier and Type | Method and Description |
---|---|
static <T extends AbstractStub<T>> |
MetadataUtils.captureMetadata(T stub,
AtomicReference<Metadata> headersCapture,
AtomicReference<Metadata> trailersCapture)
Deprecated.
Use
stub.withInterceptors(newCaptureMetadataInterceptor()) instead. |
static <T extends AbstractStub<T>> |
MetadataUtils.captureMetadata(T stub,
AtomicReference<Metadata> headersCapture,
AtomicReference<Metadata> trailersCapture)
Deprecated.
Use
stub.withInterceptors(newCaptureMetadataInterceptor()) instead. |
static ClientInterceptor |
MetadataUtils.newCaptureMetadataInterceptor(AtomicReference<Metadata> headersCapture,
AtomicReference<Metadata> trailersCapture)
Captures the last received metadata on a channel.
|
static ClientInterceptor |
MetadataUtils.newCaptureMetadataInterceptor(AtomicReference<Metadata> headersCapture,
AtomicReference<Metadata> trailersCapture)
Captures the last received metadata on a channel.
|
Modifier and Type | Method and Description |
---|---|
static ServerInterceptor |
TestUtils.recordRequestHeadersInterceptor(AtomicReference<Metadata> headersCapture)
Capture the request headers from a client.
|
Modifier and Type | Method and Description |
---|---|
void |
ForwardingClientStreamTracer.inboundTrailers(Metadata trailers) |
<ReqT,RespT> |
TransmitStatusRuntimeExceptionInterceptor.interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next) |
void |
ForwardingClientStreamTracer.streamCreated(Attributes transportAttrs,
Metadata headers) |
Modifier and Type | Method and Description |
---|---|
<ReqT,RespT> |
OrcaMetricReportingServerInterceptor.interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next) |