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 Summary
Modifier and TypeMethodDescriptionbyte[]
extractResource
(String path) Extract a resource from the *.modl fileIf the state is faulted, this enum may contain information about why the fault occurred.If the state is faulted, this will be non-null containing information about the failure.getHook()
The hook instance.getInfo()
The module info, which represents the information from the "module.xml" file inside the *.modl file.getState()
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.
-
Method Details
-
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. -
getState
ModuleState getState() -
getStateTimestamp
The last time this module's state has changed to the given state, or null if the state has not been reached. -
getFaultReason
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
Extract a resource from the *.modl file- Throws:
IOException
-