Class WebSocketUtil


  • public class WebSocketUtil
    extends Object
    Utility class for operations on websocket URIs (e.g. ws://foo.bar).
    • Method Detail

      • webSocketPort

        public static int webSocketPort​(URI uri)
        Returns the port in the Websocket URI. If no custom port is specified, the protocol default port is assumed. If no port could be determined, a IllegalArgumentException is thrown.
        Parameters:
        uri -
        Returns:
      • isWebSocketSecureURI

        public static boolean isWebSocketSecureURI​(URI uri)
        Returns true if uri is a Websocket Secure URI. Otherwise, returns false.
        Parameters:
        uri -
        Returns:
      • isWebSocketNonSecureURI

        public static boolean isWebSocketNonSecureURI​(URI uri)
        Returns true if uri is a non-secure Websocket URI. Otherwise, returns false.
        Parameters:
        uri -
        Returns:
      • isWebSocketURI

        public static boolean isWebSocketURI​(URI uri)
        Returns true if uri is Websocket URI. Otherwise, returns false.
        Parameters:
        uri -
        Returns: