public WebSocketImpl(URI location,Map<String,WebSocketExtensionFactorySpi> extensionFactories) throws URISyntaxException {
  this(location,extensionFactories,HttpRedirectPolicy.ALWAYS,null,null,new HashMap<String,WsExtensionParameterValuesSpiImpl>(),null,0);
}

public WebSocketImpl ( URI location , Map < String , WebSocketExtensionFactorySpi > extensionFactories ) throws URISyntaxException { this ( location , extensionFactories , HttpRedirectPolicy . ALWAYS , null , null , new HashMap < String , WsExtensionParameterValuesSpiImpl > ( ) , null , 0 ) ; }
creates a websocket that opens up a full - duplex connection to the target location on a supported websocket provider . call connect ( ) to establish the location after adding event listeners .
