Class LocalSession

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<org.geysermc.mcprotocollib.network.packet.Packet>
org.geysermc.mcprotocollib.network.session.NetworkSession
org.geysermc.mcprotocollib.network.session.ClientNetworkSession
org.geysermc.geyser.network.netty.LocalSession
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, org.geysermc.mcprotocollib.network.ClientSession, org.geysermc.mcprotocollib.network.Session

public final class LocalSession extends org.geysermc.mcprotocollib.network.session.ClientNetworkSession
Manages a Minecraft Java session over our LocalChannel implementations.
  • 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.session.ClientNetworkSession

    bindAddress, proxy

    Fields inherited from class org.geysermc.mcprotocollib.network.session.NetworkSession

    disconnected, packetHandlerExecutor, protocol, remoteAddress
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocalSession(SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.protocol.MinecraftProtocol protocol, Executor packetHandlerExecutor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Should only be called when direct ByteBufs should be preferred.
    protected io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel>
     
    protected io.netty.channel.ChannelHandler
     
    protected io.netty.channel.EventLoopGroup
     
    protected void
    setOptions(io.netty.bootstrap.Bootstrap bootstrap)
     

    Methods inherited from class org.geysermc.mcprotocollib.network.session.ClientNetworkSession

    connect, getProxy, newThreadFactory

    Methods inherited from class org.geysermc.mcprotocollib.network.session.NetworkSession

    addListener, callEvent, callPacketReceived, callPacketSent, channelActive, channelInactive, channelRead0, disconnect, exceptionCaught, getChannel, getFlags, getFlagSupplied, getGenericDisconnectMessage, getListeners, getLocalAddress, getPacketHandlerExecutor, getPacketProtocol, getRemoteAddress, hasFlag, isConnected, removeListener, send, setAutoRead, setCompression, setEncryption, setFlag, setFlags

    Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

    acceptInboundMessage, channelRead

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved

    Methods inherited from interface org.geysermc.mcprotocollib.network.ClientSession

    connect

    Methods inherited from interface org.geysermc.mcprotocollib.network.Session

    addListener, callEvent, callPacketReceived, callPacketSent, disconnect, disconnect, disconnect, disconnect, getChannel, getFlag, getFlag, getFlags, getFlagSupplied, getListeners, getLocalAddress, getPacketHandlerExecutor, getPacketProtocol, getRemoteAddress, hasFlag, isConnected, removeListener, send, send, setAutoRead, setCompression, setEncryption, setFlag, setFlags, switchInboundState, switchOutboundState
  • Constructor Details

    • LocalSession

      public LocalSession(SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.protocol.MinecraftProtocol protocol, Executor packetHandlerExecutor)
  • Method Details

    • getChannelFactory

      protected io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> getChannelFactory()
      Overrides:
      getChannelFactory in class org.geysermc.mcprotocollib.network.session.ClientNetworkSession
    • setOptions

      protected void setOptions(io.netty.bootstrap.Bootstrap bootstrap)
      Overrides:
      setOptions in class org.geysermc.mcprotocollib.network.session.ClientNetworkSession
    • getEventLoopGroup

      protected io.netty.channel.EventLoopGroup getEventLoopGroup()
      Overrides:
      getEventLoopGroup in class org.geysermc.mcprotocollib.network.session.ClientNetworkSession
    • getChannelHandler

      protected io.netty.channel.ChannelHandler getChannelHandler()
      Overrides:
      getChannelHandler in class org.geysermc.mcprotocollib.network.session.ClientNetworkSession
    • createDirectByteBufAllocator

      public static void createDirectByteBufAllocator()
      Should only be called when direct ByteBufs should be preferred. At this moment, this should only be called on BungeeCord.