jdk/src/java.naming/share/classes/javax/naming/ldap/package.html
changeset 45132 db2f2d72cd4f
parent 32029 a5538163e144
child 45136 bd5c526bc443
equal deleted inserted replaced
45131:bc590fe5c060 45132:db2f2d72cd4f
    46 <a href=http://www.ietf.org/rfc/rfc2251.txt>RFC 2251</a>.
    46 <a href=http://www.ietf.org/rfc/rfc2251.txt>RFC 2251</a>.
    47 The core interface in this package is <code>LdapContext</code>, which defines
    47 The core interface in this package is <code>LdapContext</code>, which defines
    48 methods on a context for performing extended operations and handling
    48 methods on a context for performing extended operations and handling
    49 controls.
    49 controls.
    50 
    50 
    51 <h4>Extended Operations</h4>
    51 <h3>Extended Operations</h3>
    52 <p>
    52 <p>
    53 This package defines the interface <code>ExtendedRequest</code>
    53 This package defines the interface <code>ExtendedRequest</code>
    54 to represent the argument to an extended operation,
    54 to represent the argument to an extended operation,
    55 and the interface <code>ExtendedResponse</code> to represent the result
    55 and the interface <code>ExtendedResponse</code> to represent the result
    56 of the extended operation.
    56 of the extended operation.
   123         return GETTIME_RESP_OID;
   123         return GETTIME_RESP_OID;
   124     }
   124     }
   125 }
   125 }
   126 </pre></blockquote>
   126 </pre></blockquote>
   127 
   127 
   128 <h4>Controls</h4>
   128 <h3>Controls</h3>
   129 
   129 
   130 This package defines the interface <code>Control</code> to represent an LDAPv3
   130 This package defines the interface <code>Control</code> to represent an LDAPv3
   131 control. It can be a control that is sent to an LDAP server
   131 control. It can be a control that is sent to an LDAP server
   132 (<em>request control</em>) or a control returned by an LDAP server
   132 (<em>request control</em>) or a control returned by an LDAP server
   133 (<em>response control</em>).  Unlike extended requests and responses,
   133 (<em>response control</em>).  Unlike extended requests and responses,
   201 
   201 
   202 // Get response controls
   202 // Get response controls
   203 Control[] respCtls = ectx.getResponseControls();
   203 Control[] respCtls = ectx.getResponseControls();
   204 if (respCtls != null) {
   204 if (respCtls != null) {
   205     // Find the one we want
   205     // Find the one we want
   206     for (int i = 0; i < respCtls; i++) {
   206     for (int i = 0; i &lt; respCtls; i++) {
   207         if(respCtls[i] instanceof ChangeIDControl) {
   207         if(respCtls[i] instanceof ChangeIDControl) {
   208 	    ChangeIDControl cctl = (ChangeIDControl)respCtls[i];
   208 	    ChangeIDControl cctl = (ChangeIDControl)respCtls[i];
   209 	    System.out.println(cctl.getChangeID());
   209 	    System.out.println(cctl.getChangeID());
   210         }
   210         }
   211     }
   211     }