Interface FIntegration


public interface FIntegration
One hook into another plugin. Implementations report their name and log when they are wired up or torn down.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Duration
    How long a message waits for hook() to finish before it is sent anyway.
  • Method Summary

    Modifier and Type
    Method
    Description
    The logger the hook messages go to.
    The name of the plugin this hooks into, as written in the log.
    default void
    Wires the integration up.
    default void
    Logs that the integration is now active.
    default void
    Logs that the integration failed to load.
    default void
    Logs that the integration is no longer active.
    default void
    Tears the integration down.
  • Field Details

    • HOOK_TIMEOUT

      static final Duration HOOK_TIMEOUT
      How long a message waits for hook() to finish before it is sent anyway.
  • Method Details

    • getIntegrationName

      String getIntegrationName()
      The name of the plugin this hooks into, as written in the log.
      Returns:
      the plugin name
    • getFLogger

      FLogger getFLogger()
      The logger the hook messages go to.
      Returns:
      the logger
    • hook

      default void hook()
      Wires the integration up. Override to do the work, then call the logging default.
    • unhook

      default void unhook()
      Tears the integration down. Override to do the work, then call the logging default.
    • logHook

      default void logHook()
      Logs that the integration is now active.
    • logHookFailed

      default void logHookFailed(Exception exception)
      Logs that the integration failed to load.
      Parameters:
      exception - the exception that caused the failure
    • logUnhook

      default void logUnhook()
      Logs that the integration is no longer active.