public class WebsocketHandler extends ChannelDuplexHandler
WebServerInitializer
if an implementation of WebsocketDispatcher
is present.ChannelHandler.Sharable
Constructor and Description |
---|
WebsocketHandler(WebsocketDispatcher websocketDispatcher)
Creates a new handler (one per connection) talking to the given dispatcher.
|
Modifier and Type | Method and Description |
---|---|
void |
channelRead(ChannelHandlerContext ctx,
Object msg) |
void |
channelUnregistered(ChannelHandlerContext ctx) |
void |
exceptionCaught(ChannelHandlerContext ctx,
Throwable e) |
void |
userEventTriggered(ChannelHandlerContext ctx,
Object evt) |
bind, close, connect, deregister, disconnect, flush, read, write
channelActive, channelInactive, channelReadComplete, channelRegistered, channelWritabilityChanged
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
public WebsocketHandler(WebsocketDispatcher websocketDispatcher)
websocketDispatcher
- the dispatcher responsible for creating a WebsocketSession
public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Exception
exceptionCaught
in interface ChannelHandler
exceptionCaught
in interface ChannelInboundHandler
exceptionCaught
in class ChannelInboundHandlerAdapter
Exception
public void channelUnregistered(ChannelHandlerContext ctx) throws Exception
channelUnregistered
in interface ChannelInboundHandler
channelUnregistered
in class ChannelInboundHandlerAdapter
Exception
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
userEventTriggered
in interface ChannelInboundHandler
userEventTriggered
in class ChannelInboundHandlerAdapter
Exception
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
channelRead
in interface ChannelInboundHandler
channelRead
in class ChannelInboundHandlerAdapter
Exception
Copyright © 2018. All rights reserved.