Interface ServiceDiscoveryMechanism<C extends ServiceDiscoveryMechanismCfg>

    • Method Detail

      • getName

        String getName()
        Returns the name of the mechanism.
        Returns:
        the name of the mechanism
      • isConfigurationAcceptable

        boolean isConfigurationAcceptable​(C configuration,
                                          List<LocalizableMessage> unacceptableReasons,
                                          ServerContext serverContext)
        Returns whether the provided configuration is correct for the mechanism. It should be possible to call this method on an uninitialized mechanism to check the configuration for correctness.
        Parameters:
        configuration - the configuration to check
        unacceptableReasons - the list of reasons the configuration is not acceptable
        serverContext - the server context of this Directory Server instance
        Returns:
        if the provided configuration is correct for the mechanism.
      • initializeMechanism

        void initializeMechanism​(C configuration,
                                 ServerContext serverContext)
        Initializes the mechanism with the provided configuration.
        Parameters:
        configuration - the configuration for initialization
        serverContext - the server context for this Directory Server instance
      • finalizeMechanism

        void finalizeMechanism()
        Frees any resources in use, mechanism will not be used anymore afterwards.
      • registerChangeListener

        void registerChangeListener​(ServiceDiscoveryChangeListener listener)
        Registers a listener to be notified when changes in the service occur.
        Parameters:
        listener - the listener to register for notifications
      • deregisterChangeListener

        void deregisterChangeListener​(ServiceDiscoveryChangeListener listener)
        De-registers a listener from notifications on service changes.
        Parameters:
        listener - the listener to de-register
      • getPartition

        Partition getPartition​(Collection<Dn> baseDNs)
        Returns the partitions.

        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.

        Parameters:
        baseDNs - the baseDNs for which to retrieve the partitions
        Returns:
        the partitions that can serve the provided base DNs