Package org.ldaptive

Interface ConnectionStrategy

    • Method Detail

      • populate

        void populate​(String urls,
                      LdapURLSet urlSet)
        Populates a LdapURLSet from the URL string provided at configuration time.
        urls - Space-delimited string of URLs describing the LDAP hosts to connect to. The URLs in the string are commonly ldap:// or ldaps:// URLs that directly describe the hosts to connect to, but may also describe a resource from which to obtain LDAP connection URLs as is the case for DnsSrvConnectionStrategy that use URLs with the scheme dns:.
        urlSet - LDAP URL set to populate.
      • initialize

        void initialize​(String urls,
                        Predicate<LdapURL> activateCondition)
        Prepare this strategy for use.
        urls - LDAP URLs for this strategy
        activateCondition - predicate to determine whether a connection is active
      • isInitialized

        boolean isInitialized()
        Whether this strategy is ready for use.
        whether this strategy is ready for use
      • getActivateCondition

        Predicate<LdapURL> getActivateCondition()
        Returns the condition used to activate connections.
        activate condition
      • getRetryCondition

        Predicate<LdapURL> getRetryCondition()
        Returns the condition used to determine whether to attempt to activate a connection.
        retry condition
      • success

        void success​(LdapURL url)
        Indicates the supplied URL was successfully connected to.
        url - which was successfully connected to
      • failure

        void failure​(LdapURL url)
        Indicates the supplied URL could not be connected to.
        url - which was could not be connected to
      • newInstance

        ConnectionStrategy newInstance()
        Create a deep copy of this strategy.
        new instance of this connection strategy