@UnstableApi public class Http2Exception extends java.lang.Exception
限定符和类型 | 类和说明 |
---|---|
static class |
Http2Exception.ClosedStreamCreationException
Used when a stream creation attempt fails but may be because the stream was previously closed.
|
static class |
Http2Exception.CompositeStreamException
Provides the ability to handle multiple stream exceptions with one throw statement.
|
static class |
Http2Exception.HeaderListSizeException |
static class |
Http2Exception.ShutdownHint
Provides a hint as to if shutdown is justified, what type of shutdown should be executed.
|
static class |
Http2Exception.StreamException
Represents an exception that can be isolated to a single stream (as opposed to the entire connection).
|
构造器和说明 |
---|
Http2Exception(Http2Error error) |
Http2Exception(Http2Error error,
Http2Exception.ShutdownHint shutdownHint) |
Http2Exception(Http2Error error,
java.lang.String message) |
Http2Exception(Http2Error error,
java.lang.String message,
Http2Exception.ShutdownHint shutdownHint) |
Http2Exception(Http2Error error,
java.lang.String message,
java.lang.Throwable cause) |
Http2Exception(Http2Error error,
java.lang.String message,
java.lang.Throwable cause,
Http2Exception.ShutdownHint shutdownHint) |
限定符和类型 | 方法和说明 |
---|---|
static Http2Exception |
closedStreamError(Http2Error error,
java.lang.String fmt,
java.lang.Object... args)
Use if an error has occurred which can not be isolated to a single stream, but instead applies
to the entire connection.
|
static Http2Exception |
connectionError(Http2Error error,
java.lang.String fmt,
java.lang.Object... args)
Use if an error has occurred which can not be isolated to a single stream, but instead applies
to the entire connection.
|
static Http2Exception |
connectionError(Http2Error error,
java.lang.Throwable cause,
java.lang.String fmt,
java.lang.Object... args)
Use if an error has occurred which can not be isolated to a single stream, but instead applies
to the entire connection.
|
Http2Error |
error() |
static Http2Exception |
headerListSizeError(int id,
Http2Error error,
boolean onDecode,
java.lang.String fmt,
java.lang.Object... args)
A specific stream error resulting from failing to decode headers that exceeds the max header size list.
|
static boolean |
isStreamError(Http2Exception e)
Check if an exception is isolated to a single stream or the entire connection.
|
Http2Exception.ShutdownHint |
shutdownHint()
Provide a hint as to what type of shutdown should be executed.
|
static Http2Exception |
streamError(int id,
Http2Error error,
java.lang.String fmt,
java.lang.Object... args)
Use if an error which can be isolated to a single stream has occurred.
|
static Http2Exception |
streamError(int id,
Http2Error error,
java.lang.Throwable cause,
java.lang.String fmt,
java.lang.Object... args)
Use if an error which can be isolated to a single stream has occurred.
|
static int |
streamId(Http2Exception e)
Get the stream id associated with an exception.
|
public Http2Exception(Http2Error error)
public Http2Exception(Http2Error error, Http2Exception.ShutdownHint shutdownHint)
public Http2Exception(Http2Error error, java.lang.String message)
public Http2Exception(Http2Error error, java.lang.String message, Http2Exception.ShutdownHint shutdownHint)
public Http2Exception(Http2Error error, java.lang.String message, java.lang.Throwable cause)
public Http2Exception(Http2Error error, java.lang.String message, java.lang.Throwable cause, Http2Exception.ShutdownHint shutdownHint)
public Http2Error error()
public Http2Exception.ShutdownHint shutdownHint()
public static Http2Exception connectionError(Http2Error error, java.lang.String fmt, java.lang.Object... args)
error
- The type of error as defined by the HTTP/2 specification.fmt
- String with the content and format for the additional debug data.args
- Objects which fit into the format defined by fmt
.public static Http2Exception connectionError(Http2Error error, java.lang.Throwable cause, java.lang.String fmt, java.lang.Object... args)
error
- The type of error as defined by the HTTP/2 specification.cause
- The object which caused the error.fmt
- String with the content and format for the additional debug data.args
- Objects which fit into the format defined by fmt
.public static Http2Exception closedStreamError(Http2Error error, java.lang.String fmt, java.lang.Object... args)
error
- The type of error as defined by the HTTP/2 specification.fmt
- String with the content and format for the additional debug data.args
- Objects which fit into the format defined by fmt
.public static Http2Exception streamError(int id, Http2Error error, java.lang.String fmt, java.lang.Object... args)
id
is not
Http2CodecUtil.CONNECTION_STREAM_ID
then a Http2Exception.StreamException
will be returned.
Otherwise the error is considered a connection error and a Http2Exception
is returned.id
- The stream id for which the error is isolated to.error
- The type of error as defined by the HTTP/2 specification.fmt
- String with the content and format for the additional debug data.args
- Objects which fit into the format defined by fmt
.id
is not
Http2CodecUtil.CONNECTION_STREAM_ID
then a Http2Exception.StreamException
will be returned.
Otherwise the error is considered a connection error and a Http2Exception
is returned.public static Http2Exception streamError(int id, Http2Error error, java.lang.Throwable cause, java.lang.String fmt, java.lang.Object... args)
id
is not
Http2CodecUtil.CONNECTION_STREAM_ID
then a Http2Exception.StreamException
will be returned.
Otherwise the error is considered a connection error and a Http2Exception
is returned.id
- The stream id for which the error is isolated to.error
- The type of error as defined by the HTTP/2 specification.cause
- The object which caused the error.fmt
- String with the content and format for the additional debug data.args
- Objects which fit into the format defined by fmt
.id
is not
Http2CodecUtil.CONNECTION_STREAM_ID
then a Http2Exception.StreamException
will be returned.
Otherwise the error is considered a connection error and a Http2Exception
is returned.public static Http2Exception headerListSizeError(int id, Http2Error error, boolean onDecode, java.lang.String fmt, java.lang.Object... args)
id
is not Http2CodecUtil.CONNECTION_STREAM_ID
then a
Http2Exception.StreamException
will be returned. Otherwise the error is considered a
connection error and a Http2Exception
is returned.id
- The stream id for which the error is isolated to.error
- The type of error as defined by the HTTP/2 specification.onDecode
- Whether this error was caught while decoding headersfmt
- String with the content and format for the additional debug data.args
- Objects which fit into the format defined by fmt
.id
is not
Http2CodecUtil.CONNECTION_STREAM_ID
then a Http2Exception.HeaderListSizeException
will be returned. Otherwise the error is considered a connection error and a Http2Exception
is
returned.public static boolean isStreamError(Http2Exception e)
e
- The exception to check.true
if e
is an instance of Http2Exception.StreamException
.
false
otherwise.public static int streamId(Http2Exception e)
e
- The exception to get the stream id for.Http2CodecUtil.CONNECTION_STREAM_ID
if e
is a connection error.
Otherwise the stream id associated with the stream error.