Package org.opends.server.discovery
Class ServiceDiscoveryMechanismConfigManager
- java.lang.Object
-
- org.opends.server.discovery.ServiceDiscoveryMechanismConfigManager
-
- All Implemented Interfaces:
ConfigurationAddListener<ServiceDiscoveryMechanismCfg>
,ConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>
public class ServiceDiscoveryMechanismConfigManager extends Object implements ConfigurationAddListener<ServiceDiscoveryMechanismCfg>, ConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>
Manages configuration additions and deletions of service discovery mechanisms in the server configuration.
-
-
Constructor Summary
Constructors Constructor Description ServiceDiscoveryMechanismConfigManager(ServerContext serverContext)
Declares a new Configuration Manager for this Directory Server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResult
applyConfigurationAdd(ServiceDiscoveryMechanismCfg configuration)
Adds a new configuration to this add listener.ConfigChangeResult
applyConfigurationDelete(ServiceDiscoveryMechanismCfg configuration)
Deletes an existing configuration from this delete listener.void
finalize()
Finalize all service discovery mechanism for shutdown.ServiceDiscoveryMechanism<?>
getMechanism(String name)
Returns the service discovery with the provided name.void
initializeServiceDiscoveryMechanismConfigManager()
Initializes the Mechanism Configuration Manager and its configuration at startup.boolean
isConfigurationAddAcceptable(ServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is acceptable to this add listener.boolean
isConfigurationDeleteAcceptable(ServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.
-
-
-
Constructor Detail
-
ServiceDiscoveryMechanismConfigManager
public ServiceDiscoveryMechanismConfigManager(ServerContext serverContext)
Declares a new Configuration Manager for this Directory Server.- Parameters:
serverContext
- the current directory server context
-
-
Method Detail
-
initializeServiceDiscoveryMechanismConfigManager
public void initializeServiceDiscoveryMechanismConfigManager()
Initializes the Mechanism Configuration Manager and its configuration at startup. Registers itself as a service in the directory server instance.
-
getMechanism
public ServiceDiscoveryMechanism<?> getMechanism(String name)
Returns the service discovery with the provided name.- Parameters:
name
- the service discovery name- Returns:
- the service discovery with the provided name, or
null
if none exist
-
isConfigurationAddAcceptable
public boolean isConfigurationAddAcceptable(ServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationAddListener
Indicates whether the proposed addition of a new configuration is acceptable to this add listener.- Specified by:
isConfigurationAddAcceptable
in interfaceConfigurationAddListener<ServiceDiscoveryMechanismCfg>
- Parameters:
configuration
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed addition is acceptable, orfalse
if it is not.
-
applyConfigurationAdd
public ConfigChangeResult applyConfigurationAdd(ServiceDiscoveryMechanismCfg configuration)
Description copied from interface:ConfigurationAddListener
Adds a new configuration to this add listener.- Specified by:
applyConfigurationAdd
in interfaceConfigurationAddListener<ServiceDiscoveryMechanismCfg>
- Parameters:
configuration
- The configuration that will be added.- Returns:
- Returns information about the result of adding the configuration.
-
isConfigurationDeleteAcceptable
public boolean isConfigurationDeleteAcceptable(ServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationDeleteListener
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.- Specified by:
isConfigurationDeleteAcceptable
in interfaceConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>
- Parameters:
configuration
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed deletion is acceptable, orfalse
if it is not.
-
applyConfigurationDelete
public ConfigChangeResult applyConfigurationDelete(ServiceDiscoveryMechanismCfg configuration)
Description copied from interface:ConfigurationDeleteListener
Deletes an existing configuration from this delete listener.- Specified by:
applyConfigurationDelete
in interfaceConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>
- Parameters:
configuration
- The existing configuration that will be deleted.- Returns:
- Returns information about the result of deleting the configuration.
-
-