Package org.ldaptive

Class LdapURLActivatorService


  • public final class LdapURLActivatorService
    extends Object
    Singleton which manages a single thread that periodically tests inactive LDAP URLs.
    • Field Detail

      • ACTIVATOR_PERIOD_PROPERTY

        private static final String ACTIVATOR_PERIOD_PROPERTY
        Ldap activator period system property.
        See Also:
        Constant Field Values
      • ACTIVATOR_PERIOD

        private static final Duration ACTIVATOR_PERIOD
        How often to test inactive connections.
      • inactiveUrls

        private final List<LdapURL> inactiveUrls
        List of inactive URLs to test.
    • Constructor Detail

      • LdapURLActivatorService

        private LdapURLActivatorService()
        Default constructor.
    • Method Detail

      • getInstance

        public static LdapURLActivatorService getInstance()
        Returns the instance of this singleton.
        Returns:
        LDAP URL activator service
      • getPeriod

        public static Duration getPeriod()
        Returns the activator period.
        Returns:
        activator period
      • registerUrl

        public void registerUrl​(LdapURL url)
        Registers an LDAP URL to be tested for activation. Once a URL becomes active it is automatically removed.
        Parameters:
        url - that is inactive and should be tested to become active
      • getInactiveUrls

        public List<LdapURL> getInactiveUrls()
        Returns the list of inactive urls.
        Returns:
        inactive urls
      • testInactiveUrls

        void testInactiveUrls()
        Tests each registered URL. Removes URLs that successfully activated.
      • clear

        void clear()
        Removes all registered inactive URLs.