Class ReferralImpl
- java.lang.Object
-
- org.apache.directory.api.ldap.model.message.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
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ReferralImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLdapUrl(String url)Adds an LDAPv3 URL to this Referral.voidaddLdapUrlBytes(byte[] urlBytes)Adds an encoded LDAPv3 URL to this Referral.booleanequals(Object obj)Compares this Referral implementation to see if it is the same as another.Collection<String>getLdapUrls()Gets an unmodifiable set of alternative referral urls.Collection<byte[]>getLdapUrlsBytes()Gets an unmodifiable set of encoded referral urls.intgetReferralLength()inthashCode()voidremoveLdapUrl(String url)Removes an LDAPv3 URL to this Referral.voidsetReferralLength(int referralLength)Set the length of the referralStringtoString()Get a String representation of a Referral
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getReferralLength
public int getReferralLength()
- Specified by:
getReferralLengthin interfaceReferral- Returns:
- The total length of the Referral
-
setReferralLength
public void setReferralLength(int referralLength)
Set the length of the referral- Specified by:
setReferralLengthin interfaceReferral- Parameters:
referralLength- The total length of the Referral
-
getLdapUrls
public Collection<String> getLdapUrls()
Gets an unmodifiable set of alternative referral urls.- Specified by:
getLdapUrlsin interfaceReferral- Returns:
- the alternative url objects.
-
getLdapUrlsBytes
public Collection<byte[]> getLdapUrlsBytes()
Gets an unmodifiable set of encoded referral urls.- Specified by:
getLdapUrlsBytesin interfaceReferral- Returns:
- the encoded url objects.
-
addLdapUrl
public void addLdapUrl(String url)
Adds an LDAPv3 URL to this Referral.- Specified by:
addLdapUrlin interfaceReferral- Parameters:
url- the LDAPv3 URL to add
-
addLdapUrlBytes
public void addLdapUrlBytes(byte[] urlBytes)
Adds an encoded LDAPv3 URL to this Referral.- Specified by:
addLdapUrlBytesin interfaceReferral- Parameters:
urlBytes- the encoded LDAPv3 URL to add
-
removeLdapUrl
public void removeLdapUrl(String url)
Removes an LDAPv3 URL to this Referral.- Specified by:
removeLdapUrlin interfaceReferral- Parameters:
url- the LDAPv3 URL to remove
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObject- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
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.
-
-