Package org.glassfish.hk2.runlevel
Class RunLevelServiceUtilities
java.lang.Object
org.glassfish.hk2.runlevel.RunLevelServiceUtilities
Utilities for using the RunLevelService
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
enableRunLevelService
(ServiceLocator locator) Enables the RunLevelService in the givenServiceLocator
.static RunLevel
getRunLevelAnnotation
(int value) Returns aRunLevel
scope annotation with the given value and RUNLEVEL_MODE_VALIDATING as the modestatic RunLevel
getRunLevelAnnotation
(int value, int mode) Returns aRunLevel
scope annotation with the given value and modeprivate static boolean
-
Constructor Details
-
RunLevelServiceUtilities
public RunLevelServiceUtilities()
-
-
Method Details
-
enableRunLevelService
Enables the RunLevelService in the givenServiceLocator
. If theRunLevelContext
is already registered then this method does nothing.All services needed by the RunLevelService feature are marked with
Service
and hence would be automatically picked up in environments that use automatic service discovery- Parameters:
locator
- the non-null service locator to add the run-level service to
-
isDupException
-
getRunLevelAnnotation
Returns aRunLevel
scope annotation with the given value and RUNLEVEL_MODE_VALIDATING as the mode- Parameters:
value
- The value this RunLevel should take- Returns:
- A
RunLevel
scope annotation
-
getRunLevelAnnotation
Returns aRunLevel
scope annotation with the given value and mode- Parameters:
value
- The value this RunLevel should takemode
- The mode the RunLevel should take:- RUNLEVEL_MODE_VALIDATING
- RUNLEVEL_MODE_NON_VALIDATING
- Returns:
- A
RunLevel
scope annotation
-