Class UnsupportedProtocolException

All Implemented Interfaces:
Serializable

public class UnsupportedProtocolException extends WebSocketException

An HTTP exception that indicates that the WebSocket subprotocols provided in the upgrade request are not supported.

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

    • UnsupportedProtocolException

      public UnsupportedProtocolException()

      Creates an unsupported protocol exception.

    • UnsupportedProtocolException

      public UnsupportedProtocolException(String message)

      Creates an unsupported protocol exception with the specified message.

      Parameters:
      message - a message
    • UnsupportedProtocolException

      public UnsupportedProtocolException(Throwable cause)

      Creates an unsupported protocol exception with the specified cause.

      Parameters:
      cause - a cause
    • UnsupportedProtocolException

      public UnsupportedProtocolException(String message, Throwable cause)

      Creates an unsupported protocol exception with the specified message and cause.

      Parameters:
      message - a message
      cause - a cause
    • UnsupportedProtocolException

      public UnsupportedProtocolException(Set<String> supportedProtocols)

      Creates an unsupported protocol exception with the specified list of media types accepted by the requested resource.

      Parameters:
      supportedProtocols - a list of supported subprotocols
    • UnsupportedProtocolException

      public UnsupportedProtocolException(Set<String> supportedProtocols, String message)

      Creates an unsupported protocol exception with the specified list of media types accepted by the requested resource and message.

      Parameters:
      supportedProtocols - a list of supported subprotocols
      message - a message
    • UnsupportedProtocolException

      public UnsupportedProtocolException(Set<String> supportedProtocols, Throwable cause)

      Creates an unsupported protocol exception with the specified list of media types accepted by the requested resource and cause.

      Parameters:
      supportedProtocols - a list of supported subprotocols
      cause - a cause
    • UnsupportedProtocolException

      public UnsupportedProtocolException(Set<String> supportedProtocols, String message, Throwable cause)

      Creates an unsupported protocol exception with the specified list of media types accepted by the requested resource, message and cause.

      Parameters:
      supportedProtocols - a list of supported subprotocols
      message - a message
      cause - a cause
  • Method Details

    • getSupportedProtocol

      public Optional<Set<String>> getSupportedProtocol()

      Returns the list of supported WebSocket subprotocols.

      Returns:
      the list of supported WebSocket subprotocols