Class VLVResponseControl


  • public class VLVResponseControl
    extends Control
    This class implements the virtual list view response controls as defined in draft-ietf-ldapext-ldapv3-vlv. The ASN.1 description for the control value is:

     VirtualListViewResponse ::= SEQUENCE {
           targetPosition    INTEGER (0 .. maxInt),
           contentCount     INTEGER (0 .. maxInt),
           virtualListViewResult ENUMERATED {
                success (0),
                operationsError (1),
                protocolError (3),
                unwillingToPerform (53),
                insufficientAccessRights (50),
                timeLimitExceeded (3),
                adminLimitExceeded (11),
                inappropriateMatching (18),
                sortControlMissing (60),
                offsetRangeError (61),
                other(80),
                ... },
           contextID     OCTET STRING OPTIONAL }
     
    • Constructor Detail

      • VLVResponseControl

        public VLVResponseControl​(int targetPosition,
                                  int contentCount,
                                  int vlvResultCode)
        Creates a new VLV response control with the provided information.
        Parameters:
        targetPosition - The position of the target entry in the result set.
        contentCount - The content count estimating the total number of entries in the result set.
        vlvResultCode - The result code for the VLV operation.
      • VLVResponseControl

        public VLVResponseControl​(boolean isCritical,
                                  int targetPosition,
                                  int contentCount,
                                  int vlvResultCode,
                                  ByteString contextID)
        Creates a new VLV response control with the provided information.
        Parameters:
        isCritical - Indicates whether the control should be considered critical.
        targetPosition - The position of the target entry in the result set.
        contentCount - The content count estimating the total number of entries in the result set.
        vlvResultCode - The result code for the VLV operation.
        contextID - The context ID for this VLV response control.
    • Method Detail

      • getTargetPosition

        public int getTargetPosition()
        Retrieves the position of the target entry in the result set.
        Returns:
        The position of the target entry in the result set.
      • getContentCount

        public int getContentCount()
        Retrieves the estimated total number of entries in the result set.
        Returns:
        The estimated total number of entries in the result set.
      • getVLVResultCode

        public int getVLVResultCode()
        Retrieves the result code for the VLV operation.
        Returns:
        The result code for the VLV operation.
      • getContextID

        public ByteString getContextID()
        Retrieves a context ID value that should be included in the next request to retrieve a page of the same result set.
        Returns:
        A context ID value that should be included in the next request to retrieve a page of the same result set, or null if there is no context ID.
      • 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.
      • toString

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