Annotated Web Socket Client end point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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