public class RequestFailureMessage
extends io.nats.client.impl.NatsMessage
Options.Builder.advancedRequestBehavior() is enabled. Construction classifies why the request
came back empty (the RequestFailureReason) from the state captured at failure time, and carries
enough detail for the JetStream layer to throw a specific RequestFailureException. It is never
published and never travels over the wire. With the flag off it is never produced
(Connection.request(...) returns null on no-response as before); with it on, core
request(...) returns this carrier and JetStream wraps it in a RequestFailureException.| Constructor and Description |
|---|
RequestFailureMessage(io.nats.client.support.NatsRequestCompletableFuture future,
java.lang.Throwable cause,
Connection.Status connectionStatus,
java.lang.String lastError) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Throwable |
getCause()
The exception caught while waiting for the response, kept so the underlying detail is never lost.
|
Connection.Status |
getConnectionStatus() |
java.lang.String |
getLastError() |
RequestFailureReason |
getReason() |
ack, ackSync, builder, consumeByteCount, getConnection, getData, getHeaders, getReplyTo, getSID, getStatus, getSubject, getSubscription, hasHeaders, inProgress, isJetStream, isStatusMessage, isUtf8mode, lastAck, metaData, nak, nakWithDelay, nakWithDelay, term, toStringpublic RequestFailureMessage(io.nats.client.support.NatsRequestCompletableFuture future,
java.lang.Throwable cause,
Connection.Status connectionStatus,
java.lang.String lastError)
public RequestFailureReason getReason()
public Connection.Status getConnectionStatus()
public java.lang.String getLastError()
public java.lang.Throwable getCause()
TimeoutException or
CancellationException as caught; for a failure delivered as an
ExecutionException it is that exception's
cause (the wrapper is unwrapped, so a timeout from the internal
cleanup task surfaces the same TimeoutException as a timeout from the request deadline).