Interface GatewayModule


  • public interface GatewayModule
    Represents a module that is loaded in the gateway. Provides access to the gateway-scoped hook (if applicable), as well as the state of the module and resources from the *.modl file.
    • Method Detail

      • getInfo

        ModuleInfo getInfo()
        The module info, which represents the information from the "module.xml" file inside the *.modl file.
      • getHook

        GatewayModuleHook getHook()
        The hook instance. May be null if the module has no hook defined for gateway scope or if the module is not running.
      • getStateTimestamp

        java.time.LocalDateTime getStateTimestamp​(ModuleState state)
        The last time this module's state has changed to the given state, or null if the state has not been reached.
      • getFaultReason

        java.lang.Throwable getFaultReason()
        If the state is faulted, this will be non-null containing information about the failure.
      • getFaultCause

        ModuleFaultCause getFaultCause()
        If the state is faulted, this enum may contain information about why the fault occurred. If some sort of exception is thrown, this will just be "Other", but if versions or dependencies aren't met, this will have more interesting information.
      • extractResource

        byte[] extractResource​(java.lang.String path)
                        throws java.io.IOException
        Extract a resource from the *.modl file
        Throws:
        java.io.IOException