Class TcpServerSession
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Packet>
com.github.steveice10.packetlib.tcp.TcpSession
com.github.steveice10.packetlib.tcp.TcpServerSession
- All Implemented Interfaces:
Session,io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class com.github.steveice10.packetlib.tcp.TcpSession
USE_EVENT_LOOP_FOR_PACKETS -
Constructor Summary
ConstructorsConstructorDescriptionTcpServerSession(String host, int port, PacketProtocol protocol, TcpServer server) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) Gets the session'sPacketCodecHelper.<T> TGets the value of the given flag as an instance of the given type.getFlags()Gets this session's set flags.booleanChecks whether this session has a flag set.Methods inherited from class com.github.steveice10.packetlib.tcp.TcpSession
addListener, callEvent, callPacketReceived, callPacketSent, connect, connect, disconnect, disconnect, disconnect, disconnect, enableEncryption, exceptionCaught, getChannel, getCompressionThreshold, getConnectTimeout, getFlag, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getReadTimeout, getRemoteAddress, getWriteTimeout, isConnected, removeListener, send, setCompressionThreshold, setConnectTimeout, setFlag, setReadTimeout, setWriteTimeoutMethods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
TcpServerSession
-
-
Method Details
-
getCodecHelper
Description copied from interface:SessionGets the session'sPacketCodecHelper.- Returns:
- The session's packet codec helper.
-
getFlags
Description copied from interface:SessionGets this session's set flags. If this session belongs to a server, the server's flags will be included in the results.- Specified by:
getFlagsin interfaceSession- Overrides:
getFlagsin classTcpSession- Returns:
- This session's flags.
-
hasFlag
Description copied from interface:SessionChecks whether this session has a flag set. If this session belongs to a server, the server's flags will also be checked.- Specified by:
hasFlagin interfaceSession- Overrides:
hasFlagin classTcpSession- Parameters:
key- Key of the flag to check for.- Returns:
- Whether this session has a flag set.
-
getFlag
Description copied from interface:SessionGets the value of the given flag as an instance of the given type. If this session belongs to a server, the server's flags will be checked for the flag as well. If the flag is not set, the specified default value will be returned.- Specified by:
getFlagin interfaceSession- Overrides:
getFlagin classTcpSession- Type Parameters:
T- Type of the flag.- Parameters:
key- Key of the flag.def- Default value of the flag.- Returns:
- Value of the flag.
-
channelActive
- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classTcpSession- Throws:
Exception
-
channelInactive
- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classTcpSession- Throws:
Exception
-