public static boolean containsWebSocketScheme ( URI uri ) { Objects . requireNonNull ( uri , "no URI object given" ) ; final String scheme = uri . getScheme ( ) ; if ( scheme != null && ( scheme . equals ( WS_SCHEME ) || scheme . equals ( WSS_SCHEME ) ) ) { return true ; } return false ; }
Checks if the given URI is a contains a valid WebSocket scheme