Refinement of factorymethod approach in WebSocketClient (for cometd to use)