Enum DynamicServiceRegistration.RegistrationMode
- java.lang.Object
-
- java.lang.Enum<DynamicServiceRegistration.RegistrationMode>
-
- de.aristaflow.adept2.base.service.DynamicServiceRegistration.RegistrationMode
-
- All Implemented Interfaces:
Serializable
,Comparable<DynamicServiceRegistration.RegistrationMode>
- Enclosing class:
- DynamicServiceRegistration<K,S extends ADEPT2Service>
public static enum DynamicServiceRegistration.RegistrationMode extends Enum<DynamicServiceRegistration.RegistrationMode>
The mode to register a service.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_IF_ABSENT
Register the service if no service is registered for the key yet, do nothing otherwise.APPEND
Append the service to the list of services already registered for the key; this may be the first service for this key.REPLACE
Replace all services registered for the key by this one.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DynamicServiceRegistration.RegistrationMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static DynamicServiceRegistration.RegistrationMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADD_IF_ABSENT
public static final DynamicServiceRegistration.RegistrationMode ADD_IF_ABSENT
Register the service if no service is registered for the key yet, do nothing otherwise.
-
APPEND
public static final DynamicServiceRegistration.RegistrationMode APPEND
Append the service to the list of services already registered for the key; this may be the first service for this key. If the service is already registered, it will be ignored.
-
REPLACE
public static final DynamicServiceRegistration.RegistrationMode REPLACE
Replace all services registered for the key by this one. This will unregister all existing services (and the key) if there are any. Anyway, this will be the first service for this key afterwards.
-
-
Method Detail
-
values
public static DynamicServiceRegistration.RegistrationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DynamicServiceRegistration.RegistrationMode c : DynamicServiceRegistration.RegistrationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DynamicServiceRegistration.RegistrationMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-