@ChannelHandler.Sharable
public abstract class AbstractWebSocketServerHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.websocketx.WebSocketFrame>
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.slf4j.Logger |
log |
protected WebSocketServer |
webSocketServer |
| 构造器和说明 |
|---|
AbstractWebSocketServerHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame msg) |
void |
clearAll() |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected abstract void |
read(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame frame) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected org.slf4j.Logger log
protected WebSocketServer webSocketServer
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive 在接口中 io.netty.channel.ChannelInboundHandlerchannelActive 在类中 io.netty.channel.ChannelInboundHandlerAdapterpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive 在接口中 io.netty.channel.ChannelInboundHandlerchannelInactive 在类中 io.netty.channel.ChannelInboundHandlerAdapterprotected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame msg)
channelRead0 在类中 io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.websocketx.WebSocketFrame>protected abstract void read(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame frame)
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught 在接口中 io.netty.channel.ChannelHandlerexceptionCaught 在接口中 io.netty.channel.ChannelInboundHandlerexceptionCaught 在类中 io.netty.channel.ChannelInboundHandlerAdapterpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered 在接口中 io.netty.channel.ChannelInboundHandleruserEventTriggered 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void clearAll()
Copyright © 2022–2023. All rights reserved.