Examples of ErraiWebSocketChannel


Examples of org.jboss.errai.bus.server.websocket.jsr356.channel.ErraiWebSocketChannel

  @OnOpen
  public void onOpen(Session session, EndpointConfig config) {
    final HttpSession httpSession = (HttpSession) config.getUserProperties().get(HttpSession.class.getName());

    final ErraiWebSocketChannel channel = ErraiChannelFactory.getInstance().buildWebsocketChannel(session, httpSession);
    CHANNELS.put(session.getId(), channel);
  }
View Full Code Here

Examples of org.jboss.errai.bus.server.websocket.jsr356.channel.ErraiWebSocketChannel

    CHANNELS.put(session.getId(), channel);
  }

  @OnMessage
  public void onMessage(String message, Session session) {
    final ErraiWebSocketChannel channel = CHANNELS.get(session.getId());
    channel.doErraiMessage(message);
  }
View Full Code Here

Examples of org.jboss.errai.bus.server.websocket.jsr356.channel.ErraiWebSocketChannel

    channel.doErraiMessage(message);
  }

  @OnClose
  public void onClose(Session session, CloseReason reason) {
    final ErraiWebSocketChannel removedChannel = CHANNELS.remove(session.getId());
    removedChannel.onSessionClosed();
    if (reason != null) {
      final int closeCode = reason.getCloseCode().getCode();
      switch (closeCode) {
      case CLOSE_CODE_ABNORMAL:
        LOGGER.debug("abnormal closing of the websocket session");
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.