public class DefaultToServerHandler extends io.netty.channel.SimpleChannelInboundHandler<Event>
GameEvents by forwarding message
events to the associated session instance.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG |
private PlayerSession |
playerSession
The player session associated with this stateful business handler.
|
| Constructor and Description |
|---|
DefaultToServerHandler(PlayerSession playerSession) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Event msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
PlayerSession |
getPlayerSession() |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
acceptInboundMessage, channelReadchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedprivate static final org.slf4j.Logger LOG
private final PlayerSession playerSession
public DefaultToServerHandler(PlayerSession playerSession)
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Event msg)
throws Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterpublic PlayerSession getPlayerSession()
Copyright © 2013. All Rights Reserved.