com.sun.jndi.ldap.ctl
Class DirSyncResponseControl

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

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

This class implements the LDAPv3 Response Control for directory synchronization as defined in draft-armijo-ldap-dirsync-01.txt. The control's value has the following ASN.1 definition:


     realReplControlValue ::= SEQUENCE {
              flag                    INTEGER
              maxReturnlength         INTEGER
              cookie                  OCTET STRING
     }

 

Author:
Vincent Ryan
See Also:
DirSyncControl, Serialized Form

Field Summary
private  byte[] cookie
          A server-generated cookie.
private  int flag
          If flag is set to a non-zero value, it implies that there is more data to retrieve.
private  int maxReturnLength
          The maximum length (in bytes) returned in a control response.
static java.lang.String OID
          The dir-sync response control's assigned object identifier is 1.2.840.113556.1.4.841.
private static long serialVersionUID
           
 
Fields inherited from class com.sun.jndi.ldap.BasicControl
criticality, id, value
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Constructor Summary
DirSyncResponseControl(java.lang.String id, boolean criticality, byte[] value)
          Constructs a paged-results response control.
 
Method Summary
 byte[] getCookie()
           
 int getFlag()
          Retrieves the more-data flag.
 int getMaxReturnLength()
          Retrieves the maximum length (in bytes) returned in a control response.
 boolean hasMoreData()
          Determines if more data is available or not.
 
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 dir-sync response control's assigned object identifier is 1.2.840.113556.1.4.841.

See Also:
Constant Field Values

flag

private int flag
If flag is set to a non-zero value, it implies that there is more data to retrieve.


maxReturnLength

private int maxReturnLength
The maximum length (in bytes) returned in a control response.


cookie

private byte[] cookie
A server-generated cookie.


serialVersionUID

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

DirSyncResponseControl

public DirSyncResponseControl(java.lang.String id,
                              boolean criticality,
                              byte[] value)
                       throws java.io.IOException
Constructs a paged-results response control.

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

getFlag

public int getFlag()
Retrieves the more-data flag.

Returns:
The more-data flag.

hasMoreData

public boolean hasMoreData()
Determines if more data is available or not.

Returns:
true if more data is available.

getMaxReturnLength

public int getMaxReturnLength()
Retrieves the maximum length (in bytes) returned in a control response.

Returns:
The length.

getCookie

public byte[] getCookie()