Package | Description |
---|---|
io.grpc |
The gRPC core public API.
|
io.grpc.internal |
Interfaces and implementations that are internal to gRPC.
|
Modifier and Type | Field and Description |
---|---|
static Status |
Status.ABORTED
The operation was aborted, typically due to a concurrency issue like sequencer check failures,
transaction aborts, etc.
|
static Status |
Status.ALREADY_EXISTS
Some entity that we attempted to create (e.g., file or directory) already exists.
|
static Status |
Status.CANCELLED
The operation was cancelled (typically by the caller).
|
static Status |
Status.DATA_LOSS
Unrecoverable data loss or corruption.
|
static Status |
Status.DEADLINE_EXCEEDED
Deadline expired before operation could complete.
|
static Status |
Status.FAILED_PRECONDITION
Operation was rejected because the system is not in a state required for the operation's
execution.
|
static Status |
Status.INTERNAL
Internal errors.
|
static Status |
Status.INVALID_ARGUMENT
Client specified an invalid argument.
|
static Status |
Status.NOT_FOUND
Some requested entity (e.g., file or directory) was not found.
|
static Status |
Status.OK
The operation completed successfully.
|
static Status |
Status.OUT_OF_RANGE
Operation was attempted past the valid range.
|
static Status |
Status.PERMISSION_DENIED
The caller does not have permission to execute the specified operation.
|
static Status |
Status.RESOURCE_EXHAUSTED
Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system
is out of space.
|
static Status |
Status.UNAUTHENTICATED
The request does not have valid authentication credentials for the operation.
|
static Status |
Status.UNAVAILABLE
The service is currently unavailable.
|
static Status |
Status.UNIMPLEMENTED
Operation is not implemented or not supported/enabled in this service.
|
static Status |
Status.UNKNOWN
Unknown error.
|
Modifier and Type | Field and Description |
---|---|
static Metadata.Key<Status> |
InternalStatus.CODE_KEY
Key to bind status code to trailing metadata.
|
Modifier and Type | Method and Description |
---|---|
Status |
Status.augmentDescription(String additionalDetail)
Create a derived instance of
Status augmenting the current description with
additional detail. |
static Status |
Status.fromCode(Status.Code code)
Return a
Status given a canonical error Status.Code object. |
static Status |
Status.fromCodeValue(int codeValue)
Return a
Status given a canonical error Status.Code value. |
static Status |
Status.fromThrowable(Throwable t)
|
Status |
StatusRuntimeException.getStatus()
Returns the status code as a
Status object. |
Status |
StatusException.getStatus()
Returns the status code as a
Status object. |
Status |
LoadBalancer.PickResult.getStatus()
The status associated with this result.
|
Status |
ConnectivityStateInfo.getStatus()
Returns the status associated with the state.
|
static Status |
Contexts.statusFromCancelled(Context context)
Returns the
Status of a cancelled context or null if the context
is not cancelled. |
Status |
Status.Code.toStatus()
Returns a
Status object corresponding to this status code. |
Status |
Status.withCause(Throwable cause)
Create a derived instance of
Status with the given cause. |
Status |
Status.withDescription(String description)
Create a derived instance of
Status with the given description. |
Modifier and Type | Method and Description |
---|---|
abstract void |
ServerCall.close(Status status,
Metadata trailers)
Close the call with the provided status.
|
void |
CallCredentials.MetadataApplier.fail(Status status)
Deprecated.
Called when there has been an error when preparing the headers.
|
static ConnectivityStateInfo |
ConnectivityStateInfo.forTransientFailure(Status error)
Returns an instance for
TRANSIENT_FAILURE , associated with an error status. |
abstract void |
LoadBalancer.handleNameResolutionError(Status error)
Handles an error from the name resolution system.
|
void |
ClientCall.Listener.onClose(Status status,
Metadata trailers)
The ClientCall has been closed.
|
void |
NameResolver.Listener.onError(Status error)
Handles an error from the resolver.
|
void |
StreamTracer.streamClosed(Status status)
Stream is closed.
|
static LoadBalancer.PickResult |
LoadBalancer.PickResult.withDrop(Status status)
A decision to fail an RPC immediately.
|
static LoadBalancer.PickResult |
LoadBalancer.PickResult.withError(Status error)
A decision to report a connectivity error to the RPC.
|
Constructor and Description |
---|
StatusException(Status status)
Constructs an exception with both a status.
|
StatusException(Status status,
Metadata trailers)
Constructs an exception with both a status and trailers.
|
StatusRuntimeException(Status status)
Constructs the exception with both a status.
|
StatusRuntimeException(Status status,
Metadata trailers)
Constructs the exception with both a status and trailers.
|
Modifier and Type | Method and Description |
---|---|
static Status |
GrpcUtil.httpStatusToGrpcStatus(int httpStatusCode)
Maps HTTP error response status codes to transport codes, as defined in
http-grpc-status-mapping.md.
|
Status |
GrpcUtil.Http2Error.status()
Gets the
Status associated with this HTTP/2 code. |
static Status |
GrpcUtil.Http2Error.statusForCode(long code)
Looks up the
Status from the given HTTP/2 error code. |
Modifier and Type | Method and Description |
---|---|
void |
ServerStream.cancel(Status status)
Tears down the stream, typically in the event of a timeout.
|
void |
AbstractClientStream.cancel(Status reason) |
void |
AbstractClientStream.Sink.cancel(Status status)
Tears down the stream, typically in the event of a timeout.
|
void |
NoopClientStream.cancel(Status status) |
void |
ClientStream.cancel(Status reason)
Abnormally terminates the stream.
|
void |
AbstractServerStream.cancel(Status status) |
void |
AbstractServerStream.Sink.cancel(Status status)
Tears down the stream, typically in the event of a timeout.
|
void |
ServerStream.close(Status status,
Metadata trailers)
Closes the stream for both reading and writing.
|
void |
AbstractServerStream.close(Status status,
Metadata trailers) |
void |
ServerStreamListener.closed(Status status)
Called when the stream is fully closed.
|
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.
|
protected abstract void |
Http2ClientStreamTransportState.http2ProcessingFailed(Status status,
boolean stopDelivery,
Metadata trailers)
Called to process a failure in HTTP/2 processing.
|
protected void |
AbstractClientStream.TransportState.inboundTrailersReceived(Metadata trailers,
Status status)
Processes the trailers and status from the server.
|
void |
ManagedClientTransport.shutdown(Status reason)
Initiates an orderly shutdown of the transport.
|
void |
ServerTransport.shutdownNow(Status reason)
Initiates a forceful shutdown in which preexisting and new calls are closed.
|
void |
ManagedClientTransport.shutdownNow(Status reason)
Initiates a forceful shutdown in which preexisting and new calls are closed.
|
void |
StatsTraceContext.streamClosed(Status status)
|
void |
AbstractServerStream.TransportState.transportReportStatus(Status status)
Notifies failure to the listener of the stream.
|
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.
|
void |
ManagedClientTransport.Listener.transportShutdown(Status s)
The transport is shutting down.
|
void |
AbstractServerStream.Sink.writeTrailers(Metadata trailers,
boolean headersSent,
Status status)
Sends trailers to the remote end point.
|
Constructor and Description |
---|
FailingClientStream(Status error)
Creates a
FailingClientStream that would fail with the given error. |
FailingClientStream(Status error,
ClientStreamListener.RpcProgress rpcProgress)
Creates a
FailingClientStream that would fail with the given error. |
Copyright © 2018. All rights reserved.