Class Http2Exception

All Implemented Interfaces:
Serializable

public class Http2Exception extends IOException
An exception that represents a http/2 error.
See Also:
  • Constructor Details

    • Http2Exception

      public Http2Exception(int streamId, Http2ErrorCode error, String message)
      Create a new instance.
      Parameters:
      streamId - Stream Identifier the exception relates to. 0 for the connection stream or > 0 for a non-connection stream.
      error - The error code.
      message - The detail message (which is saved for later retrieval by the Throwable.getMessage() method).
    • Http2Exception

      public Http2Exception(int streamId, Http2ErrorCode error, Throwable cause)
      Create a new instance.
      Parameters:
      streamId - Stream Identifier the exception relates to. 0 for the connection stream or > 0 for a non-connection stream.
      error - The error code.
      cause - The original cause which lead to this exception.
    • Http2Exception

      public Http2Exception(int streamId, Http2ErrorCode error, String message, Throwable cause)
      Create a new instance.
      Parameters:
      streamId - Stream Identifier the exception relates to. 0 for the connection stream or > 0 for a non-connection stream.
      error - The error code.
      message - The detail message (which is saved for later retrieval by the Throwable.getMessage() method).
      cause - The original cause which lead to this exception.
  • Method Details

    • errorCode

      public final Http2ErrorCode errorCode()
      Get the error code which caused this exception.
      Returns:
      the error code which caused this exception.
    • streamId

      public final int streamId()
      The Stream Identifier associated with the exception.
      Returns:
      0 for the connection stream, > 0 for a non-connection stream, or < 0 if unknown.