Example code showing how to use the WebSockets with Java