Uses of Class
io.grpc.Metadata
-
Packages that use Metadata 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 -
-
Uses of Metadata in io.grpc
Methods in io.grpc that return Metadata Modifier and Type Method Description abstract MetadataLoadBalancer.PickSubchannelArgs. getHeaders()Headers of the call.MetadataStatusException. getTrailers()Returns the received trailers.MetadataStatusRuntimeException. getTrailers()Returns the received trailers.static MetadataStatus. trailersFromThrowable(Throwable t)Extract an error trailers from the causal chain of aThrowable.Methods in io.grpc with parameters of type Metadata Modifier and Type Method Description abstract voidCallCredentials.MetadataApplier. apply(Metadata headers)Called when headers are successfully generated.StatusExceptionStatus. asException(Metadata trailers)Same asStatus.asException()but includes the provided trailers in the returned exception.StatusRuntimeExceptionStatus. asRuntimeException(Metadata trailers)Same asStatus.asRuntimeException()but includes the provided trailers in the returned exception.protected abstract voidClientInterceptors.CheckedForwardingClientCall. checkedStart(ClientCall.Listener<RespT> responseListener, Metadata headers)Subclasses implement the start logic here that would normally belong tostart().abstract voidServerCall. close(Status status, Metadata trailers)Close the call with the provided status.<ReqT,RespT>
ExecutorServerCallExecutorSupplier. getExecutor(ServerCall<ReqT,RespT> call, Metadata metadata)Returns an executor to handle the server call.voidClientStreamTracer. inboundHeaders(Metadata headers)Headers has been received from the server.voidClientStreamTracer. inboundTrailers(Metadata trailers)Trailing metadata has been received from the server.static <ReqT,RespT>
ServerCall.Listener<ReqT>Contexts. interceptCall(Context context, ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)Make the providedContextContext.current()for the creation of a listener to a received call and for all events received by that listener.<ReqT,RespT>
ServerCall.Listener<ReqT>ServerInterceptor. interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)voidMetadata. merge(Metadata other)Perform a simple merge of two sets of metadata.voidMetadata. merge(Metadata other, Set<Metadata.Key<?>> keys)Merge values from the given set of keys into this set of metadata.ClientStreamTracerClientStreamTracer.Factory. newClientStreamTracer(ClientStreamTracer.StreamInfo info, Metadata headers)Creates aClientStreamTracerfor a new client stream.abstract ServerStreamTracerServerStreamTracer.Factory. newServerStreamTracer(String fullMethodName, Metadata headers)Creates aServerStreamTracerfor a new server stream.voidClientCall.Listener. onClose(Status status, Metadata trailers)The ClientCall has been closed.voidClientCall.Listener. onHeaders(Metadata headers)The response headers have been received.abstract voidServerCall. sendHeaders(Metadata headers)Send response header metadata prior to sending a response message.abstract voidClientCall. start(ClientCall.Listener<RespT> responseListener, Metadata headers)Start a call, usingresponseListenerfor processing response messages.voidClientInterceptors.CheckedForwardingClientCall. start(ClientCall.Listener<RespT> responseListener, Metadata headers)voidForwardingClientCall. 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.voidClientStreamTracer. streamCreated(Attributes transportAttrs, Metadata headers)The stream is being created on a ready transport.Constructors in io.grpc with parameters of type Metadata Constructor 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. -
Uses of Metadata in io.grpc.protobuf
Methods in io.grpc.protobuf with parameters of type Metadata Modifier and Type Method Description static com.google.rpc.StatusStatusProto. fromStatusAndTrailers(Status status, Metadata trailers)Extracts thegoogle.rpc.Statusfrom trailers, and makes sure they match the gRPCstatus.static StatusExceptionStatusProto. toStatusException(com.google.rpc.Status statusProto, Metadata metadata)Convert aStatusinstance to aStatusExceptionwith additional metadata.static StatusExceptionStatusProto. toStatusException(com.google.rpc.Status statusProto, Metadata metadata, Throwable cause)Convert aStatusinstance to aStatusExceptionwith additional metadata and the root exception thrown.static StatusRuntimeExceptionStatusProto. toStatusRuntimeException(com.google.rpc.Status statusProto, Metadata metadata)Convert aStatusinstance to aStatusRuntimeExceptionwith additional metadata. -
Uses of Metadata in io.grpc.stub
Methods in io.grpc.stub with parameters of type Metadata Modifier and Type Method Description static ClientInterceptorMetadataUtils. newAttachHeadersInterceptor(Metadata extraHeaders)Returns a client interceptor that attaches a set of headers to requests.static ServerInterceptorMetadataUtils. newAttachMetadataServerInterceptor(Metadata extras)Returns a ServerInterceptor that adds the specified Metadata to every response stream, one way or another.Method parameters in io.grpc.stub with type arguments of type Metadata Modifier and Type Method Description static ClientInterceptorMetadataUtils. newCaptureMetadataInterceptor(AtomicReference<Metadata> headersCapture, AtomicReference<Metadata> trailersCapture)Captures the last received metadata on a channel. -
Uses of Metadata in io.grpc.testing
Method parameters in io.grpc.testing with type arguments of type Metadata Modifier and Type Method Description static ServerInterceptorTestUtils. recordRequestHeadersInterceptor(AtomicReference<Metadata> headersCapture)Capture the request headers from a client. -
Uses of Metadata in io.grpc.util
Methods in io.grpc.util with parameters of type Metadata Modifier and Type Method Description voidForwardingClientStreamTracer. inboundHeaders(Metadata headers)voidForwardingClientStreamTracer. inboundTrailers(Metadata trailers)<ReqT,RespT>
ServerCall.Listener<ReqT>TransmitStatusRuntimeExceptionInterceptor. interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)voidForwardingClientStreamTracer. streamCreated(Attributes transportAttrs, Metadata headers) -
Uses of Metadata in io.grpc.xds.orca
Methods in io.grpc.xds.orca with parameters of type Metadata Modifier and Type Method Description <ReqT,RespT>
ServerCall.Listener<ReqT>OrcaMetricReportingServerInterceptor. interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
-