Package org.glassfish.hk2.runlevel
Annotation Type RunLevel
@Scope
@Retention(RUNTIME)
@Target({TYPE,ANNOTATION_TYPE,METHOD})
@Documented
@Inherited
@Contract
public @interface RunLevel
Defines a run/start level.
-
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The metadata key for run level mode.static final int
Services set to have a non-validating run level mode will be activated by their associated run level service or through injection into another service.static final int
Services set to have a validating run level mode will be activated and deactivated by their associated run level service but may also be activated through injection into another service.static final int
The immediate run level.static final int
The initial run level.static final String
The metadata key for run level value.
-
Field Details
-
RUNLEVEL_VAL_META_TAG
The metadata key for run level value. If this value is present it MUST match the value of this annotation. If this value is set then the system will not have to reify the descriptor in order to determine its level- See Also:
-
RUNLEVEL_MODE_META_TAG
The metadata key for run level mode. If this value is present is MUST match the mode of this annotation. If this value is set then the system will not have to reify the descriptor in order to determine its mode- See Also:
-
RUNLEVEL_VAL_INITIAL
static final int RUNLEVEL_VAL_INITIALThe initial run level.- See Also:
-
RUNLEVEL_VAL_IMMEDIATE
static final int RUNLEVEL_VAL_IMMEDIATEThe immediate run level. Services set to this run level will be activated immediately.- See Also:
-
RUNLEVEL_MODE_NON_VALIDATING
static final int RUNLEVEL_MODE_NON_VALIDATINGServices set to have a non-validating run level mode will be activated by their associated run level service or through injection into another service. These services will not be checked during activation which means that the service can be activated prior to the run level service reaching the run level. The run level serves only as a fail safe for activation.- See Also:
-
RUNLEVEL_MODE_VALIDATING
static final int RUNLEVEL_MODE_VALIDATINGServices set to have a validating run level mode will be activated and deactivated by their associated run level service but may also be activated through injection into another service. The current run level of the associated run level service will be checked during activation of these services to ensure that the service is being activated in at an appropriate run level.- See Also:
-
-
Element Details
-
value
Defines the run level.- Returns:
- the run level
- Default:
0
-
mode
Defines the run level mode.- Returns:
- the mode
- Default:
1
-