Indicates the desired startup sequence for a service class. This is not used internally by Injection, but is available as a
convenience to the caller in support for a specific startup sequence for service activations.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionint
The service ranking applied when not declared explicitly. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Anything > 0 is left to the underlying provider implementation's discretion for meaning; this is just a default for something that is deemed "other than startup".static final int
Represents an eager singleton that should be started at "startup".
-
Field Details
-
STARTUP
static final int STARTUPRepresents an eager singleton that should be started at "startup". Note, however, that callers control the actual activation for these services, not the framework itself, as shown below:List<ServiceProvider<Object>> startupServices = services .lookup(ServiceInfoCriteria.builder().runLevel(RunLevel.STARTUP).build()); startupServices.stream().forEach(ServiceProvider::get);
- See Also:
-
NORMAL
static final int NORMALAnything > 0 is left to the underlying provider implementation's discretion for meaning; this is just a default for something that is deemed "other than startup".- See Also:
-
-
Element Details
-
value
int valueThe service ranking applied when not declared explicitly.- Returns:
- the startup int value, defaulting to
NORMAL
- Default:
100
-