Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active December 31, 2015 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/ab1424c11a51ecab6e43 to your computer and use it in GitHub Desktop.
Save abhirockzz/ab1424c11a51ecab6e43 to your computer and use it in GitHub Desktop.
A custom client endpoint config and its usage
WebSocketContainer webSocketContainer = ContainerProvider.getWebSocketContainer();
ClientEndpointConfig config = ClientEndpointConfig.Builder.create().decoders(StockTickDecoder.class).build();
Session session = webSocketContainer.connectToServer(StockTickerClient().class, config,
new URI("ws://hotstocks.com/ticker"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment