public class NettyWebSocket extends io.netty.channel.ChannelInboundHandlerAdapter implements WAMPSocket
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.channel.ChannelHandlerContext |
ctx |
protected Listener |
listener |
| Constructor and Description |
|---|
NettyWebSocket(io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker handshaker,
String subProtocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) |
void |
close() |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
flush() |
boolean |
isAutoRead() |
boolean |
isOpen() |
boolean |
isWritable() |
void |
kill() |
void |
send(MessageType type,
WAMPOutputStream out) |
void |
setAutoRead(boolean autoRead) |
void |
setListener(Listener listener) |
String |
subProtocol() |
channelRegistered, channelUnregistered, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected io.netty.channel.ChannelHandlerContext ctx
protected Listener listener
public NettyWebSocket(io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker handshaker,
String subProtocol)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic String subProtocol()
subProtocol in interface WAMPSocketpublic void setListener(Listener listener)
setListener in interface WAMPSocketpublic void send(MessageType type, WAMPOutputStream out)
send in interface WAMPSocketpublic boolean isAutoRead()
isAutoRead in interface WAMPSocketpublic void setAutoRead(boolean autoRead)
setAutoRead in interface WAMPSocketpublic boolean isWritable()
isWritable in interface WAMPSocketpublic void flush()
flush in interface WAMPSocketpublic boolean isOpen()
isOpen in interface WAMPSocketpublic void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelWritabilityChanged in interface io.netty.channel.ChannelInboundHandlerchannelWritabilityChanged in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void close()
close in interface WAMPSocketpublic void kill()
kill in interface WAMPSocketCopyright © 2021. All rights reserved.