LDAP Classes
Implements Java LDAP

com.novell.ldap.controls
Class LDAPVirtualListResponse

java.lang.Object
  extended bycom.novell.ldap.LDAPControl
      extended bycom.novell.ldap.controls.LDAPVirtualListResponse
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, java.io.Serializable

public class LDAPVirtualListResponse
extends LDAPControl

LDAPVirtualListResponse is a Server Control returned by the server in response to a virtual list search request.

In response to a VLV Search request the server returns an error code and if the search was successful returns the following information:

  • an index into the search results from where the returned list begins
  • an estimate of the total number of elements in the search result
  • an optional context field to be returned to the server with subsequent VLV request.

    Sample Code: VLVControl.java

    See Also:
    Serialized Form

    Constructor Summary
    LDAPVirtualListResponse(java.lang.String oid, boolean critical, byte[] values)
              This constructor is usually called by the SDK to instantiate an a LDAPControl corresponding to the Server response to a LDAP VLV Control request.
     
    Method Summary
     int getContentCount()
              Returns the size of the virtual search results list.
     java.lang.String getContext()
              Returns the cookie used by some servers to optimize the processing of virtual list requests.
     int getFirstPosition()
              Returns the index of the first entry in the returned list.
     int getResultCode()
              Returns the result code for the virtual list search request.
     
    Methods inherited from class com.novell.ldap.LDAPControl
    clone, getID, getValue, isCritical, readDSML, readExternal, register, setValue, toString, writeDSML, writeExternal
     
    Methods inherited from class java.lang.Object
    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    LDAPVirtualListResponse

    public LDAPVirtualListResponse(java.lang.String oid,
                                   boolean critical,
                                   byte[] values)
                            throws java.io.IOException
    This constructor is usually called by the SDK to instantiate an a LDAPControl corresponding to the Server response to a LDAP VLV Control request. Application programmers should not have any reason to call the constructor. This constructor besides constructing a LDAPVirtualListResponse control object also parses the contents of the response into local variables.

    RFC 2891 defines this response control as follows: The controlValue is an OCTET STRING, whose value is the BER encoding of a value of the following ASN.1:

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

    Parameters:
    oid - The OID of the control, as a dotted string.

    critical - True if the LDAP operation should be discarded if the control is not supported. False if the operation can be processed without the control.

    values - The control-specific data.
    Method Detail

    getContentCount

    public int getContentCount()
    Returns the size of the virtual search results list. This integer as the servers current estimate of what the search result size.


    getFirstPosition

    public int getFirstPosition()
    Returns the index of the first entry in the returned list. The server uses the clients request information in conjunction with its current search result list to estimate what list of entries the client is requesting. This integer is the index into the search results that is returned to the client.


    getResultCode

    public int getResultCode()
    Returns the result code for the virtual list search request.


    getContext

    public java.lang.String getContext()
    Returns the cookie used by some servers to optimize the processing of virtual list requests. Subsequent VLV requests to the same server should return this String to the server.


    LDAP Classes
    Implements Java LDAP

    Copyright © 2002 Novell, Inc. All Rights Reserved.
    Novell, Inc.
    1800 South Novell Place
    Provo, Ut 84606
    Phone: (801) 861-5000