Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Annotated Web Socket Client end point
package blog.abhirockzz.wordpress.com;
import javax.websocket.ClientEndpoint;
import javax.websocket.OnClose;
import javax.websocket.OnError;
import javax.websocket.Session;
@ClientEndpoint
public class StockTickerClient {
@OnClose
public void closed(Session session) {
System.out.println("Session " + session + " closed");
}
@OnError
public void error(Throwable error) {
System.out.println("Error: " + error.getMessage());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.