Package org.glassfish.hk2.runlevel
Class RunLevelServiceUtilities
- java.lang.Object
-
- org.glassfish.hk2.runlevel.RunLevelServiceUtilities
-
public class RunLevelServiceUtilities extends java.lang.ObjectUtilities for using the RunLevelService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classRunLevelServiceUtilities.RunLevelImpl
-
Constructor Summary
Constructors Constructor Description RunLevelServiceUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidenableRunLevelService(ServiceLocator locator)Enables the RunLevelService in the givenServiceLocator.static RunLevelgetRunLevelAnnotation(int value)Returns aRunLevelscope annotation with the given value and RUNLEVEL_MODE_VALIDATING as the modestatic RunLevelgetRunLevelAnnotation(int value, int mode)Returns aRunLevelscope annotation with the given value and modeprivate static booleanisDupException(MultiException me)
-
-
-
Method Detail
-
enableRunLevelService
public static void enableRunLevelService(ServiceLocator locator)
Enables the RunLevelService in the givenServiceLocator. If theRunLevelContextis already registered then this method does nothing.All services needed by the RunLevelService feature are marked with
Serviceand 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
private static boolean isDupException(MultiException me)
-
getRunLevelAnnotation
public static RunLevel getRunLevelAnnotation(int value)
Returns aRunLevelscope annotation with the given value and RUNLEVEL_MODE_VALIDATING as the mode- Parameters:
value- The value this RunLevel should take- Returns:
- A
RunLevelscope annotation
-
getRunLevelAnnotation
public static RunLevel getRunLevelAnnotation(int value, int mode)
Returns aRunLevelscope 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
RunLevelscope annotation
-
-