public class Http2Exception extends Exception
| Modifier and Type | Class and Description |
|---|---|
static class |
Http2Exception.CompositeStreamException
Provides the ability to handle multiple stream exceptions with one throw statement.
|
static class |
Http2Exception.StreamException
Represents an exception that can be isolated to a single stream (as opposed to the entire connection).
|
| Constructor and Description |
|---|
Http2Exception(Http2Error error) |
Http2Exception(Http2Error error,
String message) |
Http2Exception(Http2Error error,
String message,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
static Http2Exception |
connectionError(Http2Error error,
String fmt,
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,
Throwable cause,
String fmt,
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 boolean |
isStreamError(Http2Exception e)
Check if an exception is isolated to a single stream or the entire connection.
|
static Http2Exception |
streamError(int id,
Http2Error error,
String fmt,
Object... args)
Use if an error which can be isolated to a single stream has occurred.
|
static Http2Exception |
streamError(int id,
Http2Error error,
Throwable cause,
String fmt,
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.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic Http2Exception(Http2Error error)
public Http2Exception(Http2Error error, String message)
public Http2Exception(Http2Error error, String message, Throwable cause)
public Http2Error error()
public static Http2Exception connectionError(Http2Error error, String fmt, 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, Throwable cause, String fmt, 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 streamError(int id, Http2Error error, String fmt, 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, Throwable cause, String fmt, 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 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.Copyright © 2008–2015 The Netty Project. All rights reserved.