Annotation Interface ModuleTask
Represents a method that a module can specify. A method annotated with this annotation is captured during the runtime
in the module task entry. These methods are like startup and stop methods and are invoked when the module switches to
the specified module lifecycle.
The dependencies of a module are loaded for the first time in the ModuleLifeCycle.STARTED lifecycle. All
module tasks that target the ModuleLifeCycle.UNUSABLE lifecycle are never invoked.
- Since:
- 4.0
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionGet the module lifecycle in which this task should be fired.byteGet the order of this task to be fired within the other task in the same lifecycle.
-
Element Details
-
order
byte orderGet the order of this task to be fired within the other task in the same lifecycle. If two tasks with the same lifecycle target and order are defined, the sort operation will fall back to the java natural order which may change from execution to execution.This property defaults to 32.
- Returns:
- the order in which this task will be fired.
- Default:
(byte)0x20
-
lifecycle
ModuleLifeCycle lifecycleGet the module lifecycle in which this task should be fired. Please note that tasks targeting the lifecycleModuleLifeCycle.UNUSABLEwill be registered but never fired.This property defaults to
ModuleLifeCycle.STARTED- Returns:
- the module lifecycle in which this task should be fired.
- Default:
STARTED
-