Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.io.websockets
Class WebSocketServerHandler

java.lang.Object
  extended by io.netty.channel.ChannelHandlerAdapter
      extended by io.netty.channel.ChannelInboundHandlerAdapter
          extended by io.netty.channel.SimpleChannelInboundHandler
              extended by org.jboss.errai.bus.server.io.websockets.WebSocketServerHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

@ChannelHandler.Sharable
public class WebSocketServerHandler
extends io.netty.channel.SimpleChannelInboundHandler

The working prototype ErraiBus Websocket Server.


Nested Class Summary
 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
 
Field Summary
static String SESSION_ATTR_WS_STATUS
           
static String WEBSOCKET_ACTIVE
           
static String WEBSOCKET_AWAIT_ACTIVATION
           
static String WEBSOCKET_PATH
           
 
Constructor Summary
WebSocketServerHandler(ErraiService bus)
           
 
Method Summary
protected  void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg)
           
 void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
           
static void sendMessage(io.netty.channel.ChannelHandlerContext ctx, String message)
           
 void stop()
           
 
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
 
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
 
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
handlerAdded, handlerRemoved, isSharable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
 

Field Detail

SESSION_ATTR_WS_STATUS

public static final String SESSION_ATTR_WS_STATUS
See Also:
Constant Field Values

WEBSOCKET_AWAIT_ACTIVATION

public static final String WEBSOCKET_AWAIT_ACTIVATION
See Also:
Constant Field Values

WEBSOCKET_ACTIVE

public static final String WEBSOCKET_ACTIVE
See Also:
Constant Field Values

WEBSOCKET_PATH

public static final String WEBSOCKET_PATH
See Also:
Constant Field Values
Constructor Detail

WebSocketServerHandler

public WebSocketServerHandler(ErraiService bus)
Method Detail

channelRead0

protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
                            Object msg)
                     throws Exception
Specified by:
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler
Throws:
Exception

channelReadComplete

public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
                         throws Exception
Specified by:
channelReadComplete in interface io.netty.channel.ChannelInboundHandler
Overrides:
channelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapter
Throws:
Exception

sendMessage

public static void sendMessage(io.netty.channel.ChannelHandlerContext ctx,
                               String message)

stop

public void stop()

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.