Package org.opends.server.extensions
Class FileBasedTrustManagerProvider
- java.lang.Object
-
- org.opends.server.api.TrustManagerProvider<FileBasedTrustManagerProviderCfg>
-
- org.opends.server.extensions.FileBasedTrustManagerProvider
-
- All Implemented Interfaces:
ConfigurationChangeListener<FileBasedTrustManagerProviderCfg>
public final class FileBasedTrustManagerProvider extends TrustManagerProvider<FileBasedTrustManagerProviderCfg> implements ConfigurationChangeListener<FileBasedTrustManagerProviderCfg>
This class defines a trust manager provider that will reference certificates stored in a file located on the Directory Server filesystem.
-
-
Constructor Summary
Constructors Constructor Description FileBasedTrustManagerProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResult
applyConfigurationChange(FileBasedTrustManagerProviderCfg cfg)
Applies the configuration changes to this change listener.void
finalizeTrustManagerProvider()
Performs any finalization that may be necessary for this trust manager provider.TrustManager[]
getTrustManagers()
Retrieves a set ofTrustManager
objects that may be used for interactions requiring access to a trust manager.void
initializeTrustManagerProvider(FileBasedTrustManagerProviderCfg cfg)
Initializes this trust manager provider based on the information in the provided configuration entry.boolean
isConfigurationAcceptable(FileBasedTrustManagerProviderCfg cfg, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this trust manager provider.boolean
isConfigurationChangeAcceptable(FileBasedTrustManagerProviderCfg cfg, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.-
Methods inherited from class org.opends.server.api.TrustManagerProvider
getServerContext, initializeTrustManagerProvider
-
-
-
-
Method Detail
-
initializeTrustManagerProvider
public void initializeTrustManagerProvider(FileBasedTrustManagerProviderCfg cfg) throws InitializationException
Description copied from class:TrustManagerProvider
Initializes this trust manager provider based on the information in the provided configuration entry.- Specified by:
initializeTrustManagerProvider
in classTrustManagerProvider<FileBasedTrustManagerProviderCfg>
- Parameters:
cfg
- The configuration to use for this trust manager provider.- Throws:
InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
finalizeTrustManagerProvider
public void finalizeTrustManagerProvider()
Description copied from class:TrustManagerProvider
Performs any finalization that may be necessary for this trust manager provider.- Specified by:
finalizeTrustManagerProvider
in classTrustManagerProvider<FileBasedTrustManagerProviderCfg>
-
getTrustManagers
public TrustManager[] getTrustManagers() throws LdapException
Description copied from class:TrustManagerProvider
Retrieves a set ofTrustManager
objects that may be used for interactions requiring access to a trust manager.- Specified by:
getTrustManagers
in classTrustManagerProvider<FileBasedTrustManagerProviderCfg>
- Returns:
- A set of
TrustManager
objects that may be used for interactions requiring access to a trust manager. - Throws:
LdapException
- If a problem occurs while attempting to obtain the set of trust managers.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(FileBasedTrustManagerProviderCfg cfg, List<LocalizableMessage> unacceptableReasons)
Description copied from class:TrustManagerProvider
Indicates whether the provided configuration is acceptable for this trust manager provider. It should be possible to call this method on an uninitialized trust manager provider instance in order to determine whether the trust manager provider would be able to use the provided configuration.- Overrides:
isConfigurationAcceptable
in classTrustManagerProvider<FileBasedTrustManagerProviderCfg>
- Parameters:
cfg
- The trust manager provider configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
true
if the provided configuration is acceptable for this trust manager provider, orfalse
if not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(FileBasedTrustManagerProviderCfg cfg, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<FileBasedTrustManagerProviderCfg>
- Parameters:
cfg
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(FileBasedTrustManagerProviderCfg cfg)
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<FileBasedTrustManagerProviderCfg>
- Parameters:
cfg
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
-