Package org.opends.server.discovery
Class ServiceDiscoveryMechanismConfigManager
java.lang.Object
org.opends.server.discovery.ServiceDiscoveryMechanismConfigManager
- All Implemented Interfaces:
ConfigurationAddListener<ServiceDiscoveryMechanismCfg>
,ConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>
public final class ServiceDiscoveryMechanismConfigManager
extends Object
implements ConfigurationAddListener<ServiceDiscoveryMechanismCfg>, ConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>
Manages configuration additions and deletions of service discovery mechanisms in the server configuration.
-
Constructor Summary
ConstructorDescriptionServiceDiscoveryMechanismConfigManager
(ServerContext serverContext) Declares a new Configuration Manager for this Directory Server. -
Method Summary
Modifier and TypeMethodDescriptionapplyConfigurationAdd
(ServiceDiscoveryMechanismCfg configuration) Adds a new configuration to this add listener.applyConfigurationDelete
(ServiceDiscoveryMechanismCfg configuration) Deletes an existing configuration from this delete listener.void
finalize()
Finalize all service discovery mechanism for shutdown.getMechanism
(String name) Returns the service discovery with the provided name.void
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 Details
-
ServiceDiscoveryMechanismConfigManager
Declares a new Configuration Manager for this Directory Server.- Parameters:
serverContext
- the current directory server context
-
-
Method Details
-
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
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
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
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.
-
finalize
public void finalize()Finalize all service discovery mechanism for shutdown.
-