com.sun.jndi.ldap.ctl
Class VirtualListViewResponseControl

java.lang.Object
  extended by com.sun.jndi.ldap.BasicControl
      extended by com.sun.jndi.ldap.ctl.VirtualListViewResponseControl
All Implemented Interfaces:
java.io.Serializable, javax.naming.ldap.Control

public final class VirtualListViewResponseControl
extends com.sun.jndi.ldap.BasicControl

This class implements the LDAPv3 Response Control for virtual-list-view as defined in draft-ietf-ldapext-ldapv3-vlv-04.txt. The control's value has the following ASN.1 definition:


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

 

Author:
Vincent Ryan
See Also:
VirtualListViewControl, ResponseControlFactory, Serialized Form

Field Summary
private  byte[] cookie
          A server-generated cookie.
private  int listSize
          The current number of entries in the list.
static java.lang.String OID
          The virtual-list-view control's assigned object identifier is 2.16.840.1.113730.3.4.10.
private  int resultCode
          The result code of the view operation.
private static long serialVersionUID
           
private  int targetOffset
          The position of the target entry in the list.
 
Fields inherited from class com.sun.jndi.ldap.BasicControl
criticality, id, value
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Constructor Summary
VirtualListViewResponseControl(java.lang.String id, boolean criticality, byte[] value)
          Constructs a new instance of VirtualListViewResponseControl.
 
Method Summary
 byte[] getContextID()
          Retrieves the server-generated cookie (if supplied).
 javax.naming.NamingException getException()
          Retrieves the NamingException appropriate for the result code.
 int getListSize()
          Retrieves the server's estimate of the current number of entries in the list.
 int getResultCode()
          Retrieves the LDAP result code of the view operation.
 int getTargetOffset()
          Retrieves the server's estimate of the current position of the target entry in the list.
 
Methods inherited from class com.sun.jndi.ldap.BasicControl
getEncodedValue, getID, isCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OID

public static final java.lang.String OID
The virtual-list-view control's assigned object identifier is 2.16.840.1.113730.3.4.10.

See Also:
Constant Field Values

targetOffset

private int targetOffset
The position of the target entry in the list.


listSize

private int listSize
The current number of entries in the list.


resultCode

private int resultCode
The result code of the view operation.


cookie

private byte[] cookie
A server-generated cookie.


serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

VirtualListViewResponseControl

public VirtualListViewResponseControl(java.lang.String id,
                                      boolean criticality,
                                      byte[] value)
                               throws java.io.IOException
Constructs a new instance of VirtualListViewResponseControl.

Parameters:
id - The control's object identifier string.
criticality - The control's criticality.
value - The control's ASN.1 BER encoded value. May be null.
Throws:
java.io.IOException - if an error is encountered while decoding the control's value.
Method Detail

getResultCode

public int getResultCode()
Retrieves the LDAP result code of the view operation.

Returns:
The result code. A zero value indicates success.

getException

public javax.naming.NamingException getException()
Retrieves the NamingException appropriate for the result code.

Returns:
A NamingException or null if the result code indicates success.

getTargetOffset

public int getTargetOffset()
Retrieves the server's estimate of the current position of the target entry in the list.

Returns:
The position of the target entry in the list.

getListSize

public int getListSize()
Retrieves the server's estimate of the current number of entries in the list.

Returns:
The current number of entries in the list.

getContextID

public byte[] getContextID()
Retrieves the server-generated cookie (if supplied).

Returns:
A server-generated cookie or null if unavailable.