Top Description Inners Constructors Methods
org.glassfish.hk2.runlevel

public Class RunLevelServiceUtilities

extends Object
Class Inheritance
Imports
org.glassfish.hk2.api.AnnotationLiteral, .DuplicateServiceException, .MultiException, .ServiceLocator, org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext, .RunLevelControllerImpl, org.glassfish.hk2.utilities.ServiceLocatorUtilities

Utilities for using the RunLevelService
Author
jwells

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
enableRunLevelService(ServiceLocator
the non-null service locator to add the run-level service to
locator
)

Enables the RunLevelService in the given ServiceLocator.

public static RunLevel

Returns:

A RunLevel scope annotation
getRunLevelAnnotation
(int
The value this RunLevel should take
value
)

Returns a RunLevel scope annotation with the given value and RUNLEVEL_MODE_VALIDATING as the mode

public static RunLevel

Returns:

A RunLevel scope annotation
getRunLevelAnnotation
(int
The value this RunLevel should take
value
,
int
The mode the RunLevel should take:
  • RUNLEVEL_MODE_VALIDATING
  • RUNLEVEL_MODE_NON_VALIDATING
mode
)

Returns a RunLevel scope annotation with the given value and mode

private static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RunLevelServiceUtilitiesback to summary
public RunLevelServiceUtilities()

Method Detail

enableRunLevelServiceback to summary
public static void enableRunLevelService(ServiceLocator locator)

Enables the RunLevelService in the given ServiceLocator. If the RunLevelContext is already registered then this method does nothing.

All services needed by the RunLevelService feature are marked with org.jvnet.hk2.annotations.Service and hence would be automatically picked up in environments that use automatic service discovery

Parameters
locator:ServiceLocator

the non-null service locator to add the run-level service to

getRunLevelAnnotationback to summary
public static RunLevel getRunLevelAnnotation(int value)

Returns a RunLevel scope annotation with the given value and RUNLEVEL_MODE_VALIDATING as the mode

Parameters
value:int

The value this RunLevel should take

Returns:RunLevel

A RunLevel scope annotation

getRunLevelAnnotationback to summary
public static RunLevel getRunLevelAnnotation(int value, int mode)

Returns a RunLevel scope annotation with the given value and mode

Parameters
value:int

The value this RunLevel should take

mode:int

The mode the RunLevel should take:

  • RUNLEVEL_MODE_VALIDATING
  • RUNLEVEL_MODE_NON_VALIDATING
Returns:RunLevel

A RunLevel scope annotation

isDupExceptionback to summary
private static boolean isDupException(MultiException me)
org.glassfish.hk2.runlevel back to summary

private Class RunLevelServiceUtilities.RunLevelImpl

extends AnnotationLiteral<RunLevel>
implements RunLevel
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.runlevel.RunLevel, java.lang.annotation.Annotation

Field Summary

Modifier and TypeField and Description
private final int
private static final long
private final int

Constructor Summary

AccessConstructor and Description
private
RunLevelImpl(int value, int mode)

Method Summary

Modifier and TypeMethod and Description
public int
mode()

Implements org.glassfish.hk2.runlevel.RunLevel.mode.

Defines the run level mode.

public int
value()

Implements org.glassfish.hk2.runlevel.RunLevel.value.

Defines the run level.

Inherited from org.glassfish.hk2.api.AnnotationLiteral:
annotationTypeequalshashCode

Field Detail

modeback to summary
private final int mode
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.glassfish.hk2.api.AnnotationLiteral.serialVersionUID.

valueback to summary
private final int value

Constructor Detail

RunLevelImplback to summary
private RunLevelImpl(int value, int mode)

Method Detail

modeback to summary
public int mode()

Implements org.glassfish.hk2.runlevel.RunLevel.mode.

Doc from org.glassfish.hk2.runlevel.RunLevel.mode.

Defines the run level mode.

Annotations
@Override
valueback to summary
public int value()

Implements org.glassfish.hk2.runlevel.RunLevel.value.

Doc from org.glassfish.hk2.runlevel.RunLevel.value.

Defines the run level.

Annotations
@Override