public class StaticServiceDiscoveryMechanism extends Object implements org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg>
Constructor and Description |
---|
StaticServiceDiscoveryMechanism() |
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg configuration) |
void |
deregisterChangeListener(ServiceDiscoveryChangeListener listener)
De-registers a listener from notifications on service changes.
|
void |
finalizeMechanism()
Frees any resources in use, mechanism will not be used anymore afterwards.
|
protected void |
fireConnectionOptionsChanged() |
String |
getName()
Returns the name of the mechanism.
|
Set<Partition> |
getPartitions(Collection<org.forgerock.opendj.ldap.Dn> baseDns)
Returns the partitions.
|
void |
initializeMechanism(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg cfg,
ServerContext serverContext)
Initializes the mechanism with the provided configuration.
|
boolean |
isConfigurationAcceptable(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg configuration,
List<LocalizableMessage> unacceptableReasons,
ServerContext serverContext)
Returns whether the provided configuration is correct for the mechanism.
|
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg configuration,
List<LocalizableMessage> unacceptableReasons) |
void |
registerChangeListener(ServiceDiscoveryChangeListener listener)
Registers a listener to be notified when changes in the service occur.
|
String |
toString() |
public StaticServiceDiscoveryMechanism()
public void initializeMechanism(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg cfg, ServerContext serverContext)
ServiceDiscoveryMechanism
initializeMechanism
in interface ServiceDiscoveryMechanism<org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg>
cfg
- the configuration for initializationserverContext
- the server context for this Directory Server instancepublic Set<Partition> getPartitions(Collection<org.forgerock.opendj.ldap.Dn> baseDns)
ServiceDiscoveryMechanism
Each Partition
will only contain servers that are known to expose the provided list of
base DNs. An empty list of base DNs will result in all partitions and all servers being
returned. In other words, an empty list of base DNs implies that all servers contain exactly
the same base DNs.
getPartitions
in interface ServiceDiscoveryMechanism<org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg>
baseDns
- the baseDNs for which to retrieve the partitionspublic boolean isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg>
public boolean isConfigurationAcceptable(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg configuration, List<LocalizableMessage> unacceptableReasons, ServerContext serverContext)
ServiceDiscoveryMechanism
isConfigurationAcceptable
in interface ServiceDiscoveryMechanism<org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg>
configuration
- the configuration to checkunacceptableReasons
- the list of reasons the configuration is not acceptableserverContext
- the server context of this Directory Server instancepublic org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg configuration)
applyConfigurationChange
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.StaticServiceDiscoveryMechanismCfg>
public final String getName()
ServiceDiscoveryMechanism
getName
in interface ServiceDiscoveryMechanism<C extends org.forgerock.opendj.server.config.server.ServiceDiscoveryMechanismCfg>
public final void finalizeMechanism()
ServiceDiscoveryMechanism
finalizeMechanism
in interface ServiceDiscoveryMechanism<C extends org.forgerock.opendj.server.config.server.ServiceDiscoveryMechanismCfg>
protected final void fireConnectionOptionsChanged()
public final void registerChangeListener(ServiceDiscoveryChangeListener listener)
ServiceDiscoveryMechanism
registerChangeListener
in interface ServiceDiscoveryMechanism<C extends org.forgerock.opendj.server.config.server.ServiceDiscoveryMechanismCfg>
listener
- the listener to register for notificationspublic final void deregisterChangeListener(ServiceDiscoveryChangeListener listener)
ServiceDiscoveryMechanism
deregisterChangeListener
in interface ServiceDiscoveryMechanism<C extends org.forgerock.opendj.server.config.server.ServiceDiscoveryMechanismCfg>
listener
- the listener to de-registerCopyright © 2010-2017 ForgeRock AS. All Rights Reserved.