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 ConfigChangeResultapplyConfigurationAdd(ServiceDiscoveryMechanismCfg configuration)Adds a new configuration to this add listener.ConfigChangeResultapplyConfigurationDelete(ServiceDiscoveryMechanismCfg configuration)Deletes an existing configuration from this delete listener.voidfinalize()Finalize all service discovery mechanism for shutdown.ServiceDiscoveryMechanism<?>getMechanism(String name)Returns the service discovery with the provided name.voidinitializeServiceDiscoveryMechanismConfigManager()Initializes the Mechanism Configuration Manager and its configuration at startup.booleanisConfigurationAddAcceptable(ServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)Indicates whether the proposed addition of a new configuration is acceptable to this add listener.booleanisConfigurationDeleteAcceptable(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
nullif none exist
-
isConfigurationAddAcceptable
public boolean isConfigurationAddAcceptable(ServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationAddListenerIndicates whether the proposed addition of a new configuration is acceptable to this add listener.- Specified by:
isConfigurationAddAcceptablein 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
trueif the proposed addition is acceptable, orfalseif it is not.
-
applyConfigurationAdd
public ConfigChangeResult applyConfigurationAdd(ServiceDiscoveryMechanismCfg configuration)
Description copied from interface:ConfigurationAddListenerAdds a new configuration to this add listener.- Specified by:
applyConfigurationAddin 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:ConfigurationDeleteListenerIndicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.- Specified by:
isConfigurationDeleteAcceptablein 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
trueif the proposed deletion is acceptable, orfalseif it is not.
-
applyConfigurationDelete
public ConfigChangeResult applyConfigurationDelete(ServiceDiscoveryMechanismCfg configuration)
Description copied from interface:ConfigurationDeleteListenerDeletes an existing configuration from this delete listener.- Specified by:
applyConfigurationDeletein interfaceConfigurationDeleteListener<ServiceDiscoveryMechanismCfg>- Parameters:
configuration- The existing configuration that will be deleted.- Returns:
- Returns information about the result of deleting the configuration.
-
-