Class TcpServerSession
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Packet>
org.geysermc.mcprotocollib.network.tcp.TcpSession
org.geysermc.mcprotocollib.network.tcp.TcpServerSession
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,Session
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class org.geysermc.mcprotocollib.network.tcp.TcpSession
disconnected, host, port, 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 org.geysermc.mcprotocollib.network.tcp.TcpSession
addListener, callEvent, callPacketReceived, callPacketSent, channelRead0, connect, connect, connect, disconnect, exceptionCaught, getChannel, getFlag, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getRemoteAddress, isConnected, removeListener, send, setCompression, setEncryption, setFlag, setFlagsMethods 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
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemovedMethods inherited from interface org.geysermc.mcprotocollib.network.Session
disconnect, disconnect, disconnect
-
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:
flag- 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:
flag- Flag to check for.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
-