Class Netty4PlatformInjector

java.lang.Object
org.geysermc.floodgate.core.inject.Netty4PlatformInjector
All Implemented Interfaces:
org.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>

public abstract class Netty4PlatformInjector extends Object implements org.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAddon(org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel> addon)
     
    protected void
    addInjectedClient(io.netty.channel.Channel channel)
     
    void
    channelClosedCall(io.netty.channel.Channel channel)
    Method to loop through all the addons and call InjectorAddon.onChannelClosed(Object) if InjectorAddon.shouldInject()
    void
    injectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer)
    Method to loop through all the addons and call InjectorAddon.onInject(Object, boolean) if InjectorAddon.shouldInject().
    Set<io.netty.channel.Channel>
     
    void
     
    <T extends org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel>>
    T
    removeAddon(Class<T> addon)
     
    void
    removeAddonsCall(io.netty.channel.Channel channel)
    Method to loop through all the addons and call InjectorAddon.onRemoveInject(Object) if InjectorAddon.shouldInject().
    void
    removeInjectedClient(io.netty.channel.Channel channel)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.geysermc.floodgate.core.api.inject.PlatformInjector

    canRemoveInjection, inject, isInjected, removeInjection
  • Constructor Details

    • Netty4PlatformInjector

      public Netty4PlatformInjector()
  • Method Details

    • registerAddons

      @PostConstruct public void registerAddons()
    • addInjectedClient

      protected void addInjectedClient(io.netty.channel.Channel channel)
    • removeInjectedClient

      public void removeInjectedClient(io.netty.channel.Channel channel)
    • injectedClients

      public Set<io.netty.channel.Channel> injectedClients()
    • addAddon

      public void addAddon(org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel> addon)
      Specified by:
      addAddon in interface org.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
    • removeAddon

      public <T extends org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel>> T removeAddon(Class<T> addon)
      Specified by:
      removeAddon in interface org.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
    • injectAddonsCall

      public void injectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer)
      Method to loop through all the addons and call InjectorAddon.onInject(Object, boolean) if InjectorAddon.shouldInject().
      Parameters:
      channel - the channel to inject
      proxyToServer - true if the proxy is connecting to a server or false when the player is connecting to the proxy or false when the platform isn't a proxy
    • channelClosedCall

      public void channelClosedCall(io.netty.channel.Channel channel)
      Method to loop through all the addons and call InjectorAddon.onChannelClosed(Object) if InjectorAddon.shouldInject()
      Parameters:
      channel - the channel that was injected
    • removeAddonsCall

      public void removeAddonsCall(io.netty.channel.Channel channel)
      Method to loop through all the addons and call InjectorAddon.onRemoveInject(Object) if InjectorAddon.shouldInject().
      Parameters:
      channel - the channel that was injected