Package org.ldaptive

Class SearchResultReference

  • All Implemented Interfaces:
    Freezable, Message

    public final class SearchResultReference
    extends AbstractMessage
    implements Freezable
    LDAP search result entry defined as:
       SearchResultReference ::= [APPLICATION 19] SEQUENCE
         SIZE (1..MAX) OF uri URI
     
    • Field Detail

      • HASH_CODE_SEED

        private static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • REFERRAL_URI_PATH

        private static final DERPath REFERRAL_URI_PATH
        DER path to referral URI.
      • references

        private final List<String> references
        List of references.
      • immutable

        private volatile boolean immutable
        Whether this object has been marked immutable.
    • Constructor Detail

      • SearchResultReference

        public SearchResultReference()
        Default constructor.
      • SearchResultReference

        public SearchResultReference​(DERBuffer buffer)
        Creates a new search result reference.
        Parameters:
        buffer - to decode
    • Method Detail

      • freeze

        public void freeze()
        Description copied from interface: Freezable
        Freezes this object, making it immutable.
        Specified by:
        freeze in interface Freezable
      • isFrozen

        public boolean isFrozen()
        Description copied from interface: Freezable
        Determines whether this object is frozen, i.e. immutable.
        Specified by:
        isFrozen in interface Freezable
        Returns:
        True if Freezable.freeze() has been invoked, false otherwise.
      • assertMutable

        public void assertMutable()
        Description copied from interface: Freezable
        Asserts that this object is in a state to permit mutations. Classes that implement this interface should invoke this method prior to performing any mutation of internal state as a means of implementing the "frozen" usage contract.
        Specified by:
        assertMutable in interface Freezable
      • getUris

        public String[] getUris()
        Returns the URIs in this reference.
        Returns:
        reference URIs
      • addUris

        public void addUris​(String... uri)
        Adds a new URI to this reference.
        Parameters:
        uri - to add
      • addUris

        public void addUris​(Collection<String> uris)
        Adds a new URI to this reference.
        Parameters:
        uris - to add
      • removeUris

        public void removeUris​(String... uri)
        Removes a URI from this reference.
        Parameters:
        uri - to remove
      • removeUris

        public void removeUris​(Collection<String> uris)
        Removes a URI from this reference.
        Parameters:
        uris - to remove
      • hashCode

        public int hashCode()
        Description copied from class: AbstractMessage
        Returns the hash code for this object.
        Specified by:
        hashCode in class AbstractMessage
        Returns:
        hash code
      • copy

        public static SearchResultReference copy​(SearchResultReference ref)
        Creates a mutable copy of the supplied search result reference.
        Parameters:
        ref - to copy
        Returns:
        new search result reference instance