Class PersistentSearchControl


  • public class PersistentSearchControl
    extends Control
    This class implements the persistent search control defined in draft-ietf-ldapext-psearch. It makes it possible for clients to be notified of changes to information in the Directory Server as they occur.
    • Constructor Detail

      • PersistentSearchControl

        public PersistentSearchControl​(Set<PersistentSearchChangeType> changeTypes,
                                       boolean changesOnly,
                                       boolean returnECs)
        Creates a new persistent search control with the provided information.
        Parameters:
        changeTypes - The set of change types for which to provide notification to the client.
        changesOnly - Indicates whether to only return changes that match the associated search criteria, or to also return all existing entries that match the filter.
        returnECs - Indicates whether to include the entry change notification control in updated entries that match the associated search criteria.
      • PersistentSearchControl

        public PersistentSearchControl​(boolean isCritical,
                                       Set<PersistentSearchChangeType> changeTypes,
                                       boolean changesOnly,
                                       boolean returnECs)
        Creates a new persistent search control with the provided information.
        Parameters:
        isCritical - Indicates whether the control should be considered critical for the operation processing.
        changeTypes - The set of change types for which to provide notification to the client.
        changesOnly - Indicates whether to only return changes that match the associated search criteria, or to also return all existing entries that match the filter.
        returnECs - Indicates whether to include the entry change notification control in updated entries that match the associated search criteria.
    • Method Detail

      • writeValue

        protected void writeValue​(ASN1Writer writer)
                           throws IOException
        Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.
        Specified by:
        writeValue in class Control
        Parameters:
        writer - The ASN.1 writer to use.
        Throws:
        IOException - If a problem occurs while writing to the stream.
      • getChangeTypes

        public Set<PersistentSearchChangeType> getChangeTypes()
        Retrieves the set of change types for this persistent search control.
        Returns:
        The set of change types for this persistent search control.
      • getChangesOnly

        public boolean getChangesOnly()
        Indicates whether to only return changes that match the associated search criteria, or to also return all existing entries that match the filter.
        Returns:
        true if only changes to matching entries should be returned, or false if existing matches should also be included.
      • getReturnECs

        public boolean getReturnECs()
        Indicates whether to include the entry change notification control in entries returned to the client as the result of a change in the Directory Server data.
        Returns:
        true if entry change notification controls should be included in applicable entries, or false if not.
      • toString

        public void toString​(StringBuilder buffer)
        Appends a string representation of this persistent search control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which the information should be appended.