Enum Class Config.Scope
- All Implemented Interfaces:
Serializable
,Comparable<Config.Scope>
,java.lang.constant.Constable
- Enclosing class:
- Config
The types of visibility available for a service.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis scope means the service definition applies at the Global level of AM.This scope means the service will be defined in a service assignable.This scope means the service will be defined at the Realm level of AM.This scope means the service can be created at the Global level and at the Realm level.This scope is a special scope only to be used for defining services. -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeForScope
(Config.Scope scope, Runnable runnable) Execute the provided runnable if the scope matches the current scope.static Config.Scope
Returns the enum constant of this class with the specified name.static Config.Scope[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SERVICE
This scope is a special scope only to be used for defining services. It does not define service configuration, but rather acts as a container for service configuration which is intended to then holdGLOBAL
,REALM
orREALM_AND_GLOBAL
configuration definitions. -
REALM_AND_GLOBAL
This scope means the service can be created at the Global level and at the Realm level.Note: To the question of why not introduce a Set/Array of Scopes to capture this concept, the reason was that
Config
was supported API by this point and it was deemed simpler to introduce a new enumeration to capture this concept. -
GLOBAL
This scope means the service definition applies at the Global level of AM. -
REALM
This scope means the service will be defined at the Realm level of AM. -
IDENTITY
This scope means the service will be defined in a service assignable.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
executeForScope
Execute the provided runnable if the scope matches the current scope.- Parameters:
scope
- the scope to check against.runnable
- the runnable to execute.
-