Class WebSocketException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnsupportedProtocolException

public class WebSocketException extends HttpException

Thrown to indicate an error while processing a WebSocket exchange.

Since:
1.5
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • WebSocketException

      public WebSocketException()

      Creates a WebSocket exception with default status Internal Server Error (500).

    • WebSocketException

      public WebSocketException(String message)

      Creates a WebSocket exception with default status Internal Server Error (500) and specified message.

      Parameters:
      message - a message
    • WebSocketException

      public WebSocketException(Throwable cause)

      Creates a WebSocket exception with default status Internal Server Error (500) and specified cause.

      Parameters:
      cause - a cause
    • WebSocketException

      public WebSocketException(String message, Throwable cause)

      Creates a WebSocket exception with default status Internal Server Error (500), specified message and cause

      Parameters:
      message - a message
      cause - a cause
    • WebSocketException

      public WebSocketException(int statusCode) throws IllegalArgumentException

      Creates a WebSocket exception with specified HTTP status code.

      Parameters:
      statusCode - a HTTP status code
      Throws:
      IllegalArgumentException - if the specified status doesn't correspond to a known HTTP status
    • WebSocketException

      public WebSocketException(int statusCode, String message) throws IllegalArgumentException

      Creates a WebSocket exception with specified HTTP status code and message.

      Parameters:
      statusCode - a HTTP status code
      message - a message
      Throws:
      IllegalArgumentException - if the specified status doesn't correspond to a known HTTP status
    • WebSocketException

      public WebSocketException(int statusCode, Throwable cause) throws IllegalArgumentException

      Creates a WebSocket exception with specified HTTP status code and cause.

      Parameters:
      statusCode - a HTTP status code
      cause - a cause
      Throws:
      IllegalArgumentException - if the specified status doesn't correspond to a known HTTP status
    • WebSocketException

      public WebSocketException(int statusCode, String message, Throwable cause) throws IllegalArgumentException

      Creates a WebSocket exception with specified HTTP status code, message and cause.

      Parameters:
      statusCode - a HTTP status code
      message - a message
      cause - a cause
      Throws:
      IllegalArgumentException - if the specified status doesn't correspond to a known HTTP status
    • WebSocketException

      public WebSocketException(Status status)

      Creates a WebSocket exception with specified HTTP status.

      Parameters:
      status - a HTTP status
    • WebSocketException

      public WebSocketException(Status status, String message)

      Creates a WebSocket exception with specified HTTP status and message.

      Parameters:
      status - a HTTP status
      message - a message
    • WebSocketException

      public WebSocketException(Status status, Throwable cause)

      Creates a WebSocket exception with specified HTTP status and cause.

      Parameters:
      status - a HTTP status
      cause - a cause
    • WebSocketException

      public WebSocketException(Status status, String message, Throwable cause)

      Creates a WebSocket exception with specified HTTP status, message and cause.

      Parameters:
      status - a HTTP status
      message - a message
      cause - a cause