
public class NetworkServerHandler extends io.netty.channel.SimpleChannelInboundHandler<NetworkPacket>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isBlackListed
Is this network connection being refused (black listed)
|
protected boolean |
isServer
Is this Handler a server side
|
protected boolean |
isSSL
Does this Handler is for SSL
|
| Constructor and Description |
|---|
NetworkServerHandler(boolean isServer) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
NetworkPacket msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
DbSession |
getDbSession() |
boolean |
isSsl() |
void |
setKeepAlivedSent() |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
static void |
writeError(io.netty.channel.Channel channel,
Integer remoteId,
Integer localId,
AbstractLocalPacket error)
Write error back to remote client
|
acceptInboundMessage, channelReadchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected boolean isSSL
protected final boolean isServer
protected volatile boolean isBlackListed
public NetworkServerHandler(boolean isServer)
isServer - public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void setKeepAlivedSent()
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
NetworkPacket msg)
throws Exception
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<NetworkPacket>Exceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterpublic static void writeError(io.netty.channel.Channel channel,
Integer remoteId,
Integer localId,
AbstractLocalPacket error)
channel - remoteId - localId - error - public DbSession getDbSession()
public boolean isSsl()
Copyright © 2009–2020 Waarp. All rights reserved.