public static WebSocketFactory createWebSocketFactory() {
        Class<WebSocketFactory>         clazz = WebSocketFactory.class;
        ServiceLoader<WebSocketFactory> loader = ServiceLoader.load(clazz);
        return loader.iterator().next();    
    }
public static WebSocketFactory createWebSocketFactory ( ) { Class < WebSocketFactory > clazz = WebSocketFactory . class ; ServiceLoader < WebSocketFactory > loader = ServiceLoader . load ( clazz ) ; return loader . iterator ( ) . next ( ) ; }
Creates and returns a new instance of the default implementation of the
{@link WebSocketFactory}.

@return WebSocketFactory