Class ReferralImpl

  • All Implemented Interfaces:
    Referral

    public class ReferralImpl
    extends Object
    implements Referral
    A Referral implementation. For the time being this implementation uses a String representation for LDAPURLs. In the future an LdapUrl interface with default implementations will be used once a parser for an LdapUrl is created.
    Author:
    Apache Directory Project
    • Method Detail

      • setReferralLength

        public void setReferralLength​(int referralLength)
        Set the length of the referral
        Specified by:
        setReferralLength in interface Referral
        Parameters:
        referralLength - The total length of the Referral
      • addLdapUrl

        public void addLdapUrl​(String url)
        Adds an LDAPv3 URL to this Referral.
        Specified by:
        addLdapUrl in interface Referral
        Parameters:
        url - the LDAPv3 URL to add
      • addLdapUrlBytes

        public void addLdapUrlBytes​(byte[] urlBytes)
        Adds an encoded LDAPv3 URL to this Referral.
        Specified by:
        addLdapUrlBytes in interface Referral
        Parameters:
        urlBytes - the encoded LDAPv3 URL to add
      • equals

        public boolean equals​(Object obj)
        Compares this Referral implementation to see if it is the same as another. The classes do not have to be the same implementation to return true. Both this and the compared Referral must have the same entries exactly. The order of Referral URLs does not matter.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare this ReferralImpl to
        Returns:
        true if both implementations contain exactly the same URLs
      • toString

        public String toString()
        Get a String representation of a Referral
        Overrides:
        toString in class Object
        Returns:
        A Referral String