Package org.jwebsocket.server

Examples of org.jwebsocket.server.TokenServer.addListener()


    // get the token server
    TokenServer lTS0 = (TokenServer) JWebSocketFactory.getServer("ts0");
    if (lTS0 != null) {
      // and add the sample listener to the server's listener chain
      lTS0.addListener(new JWebSocketTokenListenerSample());
    }

    // get the custom server
    CustomServer lCS0 = (CustomServer) JWebSocketFactory.getServer("cs0");
    if (lCS0 != null) {
View Full Code Here


  public void init() {
    log = Logging.getLogger(WebSocketDemo.class);
    log.info("Adding servlet '" + getClass().getSimpleName() + "' to WebSocket listeners...");
    TokenServer lServer = (TokenServer) JWebSocketFactory.getServer("ts0");
    if (lServer != null) {
      lServer.addListener(this);
    }
  }

  @Override
  public void processOpened(WebSocketServerEvent aEvent) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.