com.sun.jndi.ldap.ctl
Class DirSyncControl

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

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

This class implements the LDAPv3 Request 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 {
         parentsFirst     INTEGER,
         maxReturnlength  INTEGER,
         cookie           OCTET STRING }

 

Author:
Vincent Ryan
See Also:
DirSyncResponseControl, Serialized Form

Field Summary
private  byte[] cookie
          A server-generated cookie.
private  int maxReturnLength
          The maximum length (in bytes) to be returned in a control response.
static java.lang.String OID
          The dir-sync control's assigned object identifier is 1.2.840.113556.1.4.841.
private  int parentsFirst
          Parent entries are returned before their children when value is set to 1.
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
DirSyncControl()
          Constructs a dir-sync control.
DirSyncControl(boolean criticality)
          Constructs a dir-sync control.
DirSyncControl(int parentsFirst, int maxReturnLength, byte[] cookie, boolean criticality)
          Constructs a dir-sync control.
 
Method Summary
private  byte[] setEncodedValue()
           
 
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 control's assigned object identifier is 1.2.840.113556.1.4.841.

See Also:
Constant Field Values

parentsFirst

private int parentsFirst
Parent entries are returned before their children when value is set to 1.


maxReturnLength

private int maxReturnLength
The maximum length (in bytes) to be returned in a control response. Must be greater than zero for any data to be returned.


cookie

private byte[] cookie
A server-generated cookie.


serialVersionUID

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

DirSyncControl

public DirSyncControl()
               throws java.io.IOException
Constructs a dir-sync control.

Throws:
java.io.IOException - If a BER encoding error occurs.

DirSyncControl

public DirSyncControl(boolean criticality)
               throws java.io.IOException
Constructs a dir-sync control.

Parameters:
criticality - The control's criticality setting.
Throws:
java.io.IOException - If a BER encoding error occurs.

DirSyncControl

public DirSyncControl(int parentsFirst,
                      int maxReturnLength,
                      byte[] cookie,
                      boolean criticality)
               throws java.io.IOException
Constructs a dir-sync control.

Parameters:
parentsFirst - Parent entries are returned before their children when value is set to 1.
maxReturnLength - The maximum length (in bytes) to be returned in a control response. Must be greater than zero for any data to be returned.
cookie - A server-generated cookie.
criticality - The control's criticality setting.
Throws:
java.io.IOException - If a BER encoding error occurs.
Method Detail

setEncodedValue

private byte[] setEncodedValue()
                        throws java.io.IOException
Throws:
java.io.IOException