Interface InjectorAddon


public interface InjectorAddon
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onChannelClosed(io.netty.channel.Channel channel)
    Called when the channel has been closed.
    void
    onInject(io.netty.channel.Channel channel, boolean toServer)
    Called when injecting a specific channel (every client that is connected to the server has his own channel).
    void
    onRemoveInject(io.netty.channel.Channel channel)
    Called when Floodgate is removing the injection from the server.
    boolean
    If the Injector should call onInject(Channel, boolean)
  • Method Details

    • onInject

      void onInject(io.netty.channel.Channel channel, boolean toServer)
      Called when injecting a specific channel (every client that is connected to the server has his own channel). Internally used for the Floodgate debugger and data handler but can also be used for third party things.
      Parameters:
      channel - the channel that the injector is injecting
      toServer - if the connection is between a proxy and a server
    • onChannelClosed

      default void onChannelClosed(io.netty.channel.Channel channel)
      Called when the channel has been closed. Note that this method will be called for every closed connection (if it is injected), so it'll also run this method for closed connections between a server and the proxy (when Floodgate is running on a proxy).
      Parameters:
      channel - the channel that the injector injected
    • onRemoveInject

      void onRemoveInject(io.netty.channel.Channel channel)
      Called when Floodgate is removing the injection from the server. The addon should remove his traces otherwise it is likely that an error will popup after the server is injected again.
      Parameters:
      channel - the channel that the injector injected
    • shouldInject

      boolean shouldInject()
      If the Injector should call onInject(Channel, boolean)
      Returns:
      true if it should, false otherwise