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
ConstructorsConstructorDescriptionServiceDiscoveryMechanismConfigManager(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.voidfinalize()Finalize all service discovery mechanism for shutdown.getMechanism(String name) Returns the service discovery with the provided name.voidInitializes 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 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
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
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
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.
-
finalize
public void finalize()Finalize all service discovery mechanism for shutdown.
-