Package | Description |
---|---|
io.grpc |
The gRPC core public API.
|
io.grpc.internal |
Interfaces and implementations that are internal to gRPC.
|
io.grpc.util |
Utilities with advanced features in the core layer that user can optionally use.
|
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 |
InternalMetadata.newMetadata(byte[]... binaryValues) |
static Metadata |
InternalMetadata.newMetadata(int usedNames,
byte[]... binaryValues) |
static Metadata |
Status.trailersFromThrowable(Throwable t)
Extract an error trailers from the causal chain of a
Throwable . |
Modifier and Type | Method and Description |
---|---|
void |
CallCredentials.MetadataApplier.apply(Metadata headers)
Deprecated.
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.
|
static int |
InternalMetadata.headerCount(Metadata md) |
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(CallOptions callOptions,
Metadata headers)
Creates a
ClientStreamTracer for a new client stream. |
ClientStreamTracer |
ClientStreamTracer.Factory.newClientStreamTracer(Metadata headers)
Deprecated.
Override/call
ClientStreamTracer.Factory.newClientStreamTracer(CallOptions, Metadata) instead. |
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.
|
static byte[][] |
InternalMetadata.serialize(Metadata md) |
void |
ForwardingClientCall.start(ClientCall.Listener<RespT> responseListener,
Metadata headers) |
void |
ClientInterceptors.CheckedForwardingClientCall.start(ClientCall.Listener<RespT> responseListener,
Metadata headers) |
abstract void |
ClientCall.start(ClientCall.Listener<RespT> responseListener,
Metadata headers)
Start a call, using
responseListener for processing response messages. |
ServerCall.Listener<RequestT> |
ServerCallHandler.startCall(ServerCall<RequestT,ResponseT> call,
Metadata headers)
Produce a non-
null listener for the incoming call. |
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 |
---|---|
void |
ServerStream.close(Status status,
Metadata trailers)
Closes the stream for both reading and writing.
|
void |
AbstractServerStream.close(Status status,
Metadata trailers) |
void |
ClientStreamListener.closed(Status status,
ClientStreamListener.RpcProgress rpcProgress,
Metadata trailers)
Called when the stream is fully closed.
|
void |
ClientStreamListener.closed(Status status,
Metadata trailers)
Called when the stream is fully closed.
|
void |
ClientStreamListener.headersRead(Metadata headers)
Called upon receiving all header information from the remote end-point.
|
protected abstract void |
Http2ClientStreamTransportState.http2ProcessingFailed(Status status,
boolean stopDelivery,
Metadata trailers)
Called to process a failure in HTTP/2 processing.
|
protected void |
AbstractClientStream.TransportState.inboundHeadersReceived(Metadata headers)
Called by transport implementations when they receive headers.
|
protected void |
AbstractClientStream.TransportState.inboundTrailersReceived(Metadata trailers,
Status status)
Processes the trailers and status from the server.
|
static StatsTraceContext |
StatsTraceContext.newClientContext(CallOptions callOptions,
Metadata headers)
Factory method for the client-side.
|
static StatsTraceContext |
StatsTraceContext.newServerContext(List<ServerStreamTracer.Factory> factories,
String fullMethodName,
Metadata headers)
Factory method for the server-side.
|
ClientStream |
ClientTransport.newStream(MethodDescriptor<?,?> method,
Metadata headers,
CallOptions callOptions)
Creates a new stream for sending messages to a remote end-point.
|
void |
ServerTransportListener.streamCreated(ServerStream stream,
String method,
Metadata headers)
Called when a new stream was created by the remote client.
|
static byte[][] |
TransportFrameUtil.toHttp2Headers(Metadata headers)
Transform the given headers to a format where only spec-compliant ASCII characters are allowed.
|
protected void |
Http2ClientStreamTransportState.transportHeadersReceived(Metadata headers)
Called by subclasses whenever
Headers are received from the transport. |
void |
AbstractClientStream.TransportState.transportReportStatus(Status status,
boolean stopDelivery,
Metadata trailers)
Report stream closure with status to the application layer if not already reported.
|
void |
AbstractClientStream.TransportState.transportReportStatus(Status status,
ClientStreamListener.RpcProgress rpcProgress,
boolean stopDelivery,
Metadata trailers)
Report stream closure with status to the application layer if not already reported.
|
protected void |
Http2ClientStreamTransportState.transportTrailersReceived(Metadata trailers)
Called by subclasses for the terminal trailer metadata on a stream.
|
void |
ServerStream.writeHeaders(Metadata headers)
Writes custom metadata as headers on the response stream sent to the client.
|
void |
AbstractServerStream.writeHeaders(Metadata headers) |
void |
AbstractServerStream.Sink.writeHeaders(Metadata headers)
Sends response headers to the remote end point.
|
void |
AbstractClientStream.Sink.writeHeaders(Metadata metadata,
byte[] payload)
Sends the request headers to the remote end point.
|
void |
AbstractServerStream.Sink.writeTrailers(Metadata trailers,
boolean headersSent,
Status status)
Sends trailers to the remote end point.
|
Constructor and Description |
---|
AbstractClientStream(WritableBufferAllocator bufferAllocator,
StatsTraceContext statsTraceCtx,
TransportTracer transportTracer,
Metadata headers,
boolean useGet) |
Modifier and Type | Method and Description |
---|---|
<ReqT,RespT> |
TransmitStatusRuntimeExceptionInterceptor.interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next) |
Copyright © 2018. All rights reserved.