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

public class TcpServerSession extends TcpSession
  • Constructor Details

  • Method Details

    • getCodecHelper

      public PacketCodecHelper getCodecHelper()
      Description copied from interface: Session
      Gets the session's PacketCodecHelper.
      Returns:
      The session's packet codec helper.
    • getFlags

      public Map<String,Object> getFlags()
      Description copied from interface: Session
      Gets this session's set flags. If this session belongs to a server, the server's flags will be included in the results.
      Specified by:
      getFlags in interface Session
      Overrides:
      getFlags in class TcpSession
      Returns:
      This session's flags.
    • hasFlag

      public boolean hasFlag(Flag<?> flag)
      Description copied from interface: Session
      Checks whether this session has a flag set. If this session belongs to a server, the server's flags will also be checked.
      Specified by:
      hasFlag in interface Session
      Overrides:
      hasFlag in class TcpSession
      Parameters:
      flag - Flag to check for.
      Returns:
      Whether this session has a flag set.
    • getFlag

      public <T> T getFlag(Flag<T> flag, T def)
      Description copied from interface: Session
      Gets 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:
      getFlag in interface Session
      Overrides:
      getFlag in class TcpSession
      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

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelActive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelActive in class TcpSession
      Throws:
      Exception
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class TcpSession
      Throws:
      Exception