< prev index next >
src/java.naming/share/classes/javax/naming/ldap/package.html
Print this page
@@ -42,19 +42,19 @@
<p>
This package is for applications and service providers that deal with
LDAPv3 extended operations and controls, as defined by
<a href=http://www.ietf.org/rfc/rfc2251.txt>RFC 2251</a>.
-The core interface in this package is <tt>LdapContext</tt>, which defines
+The core interface in this package is <code>LdapContext</code>, which defines
methods on a context for performing extended operations and handling
controls.
<h4>Extended Operations</h4>
<p>
-This package defines the interface <tt>ExtendedRequest</tt>
+This package defines the interface <code>ExtendedRequest</code>
to represent the argument to an extended operation,
-and the interface <tt>ExtendedResponse</tt> to represent the result
+and the interface <code>ExtendedResponse</code> to represent the result
of the extended operation.
An extended response is always paired with an extended request
but not necessarily vice versa. That is, you can have an extended request
that has no corresponding extended response.
<p>
@@ -71,20 +71,20 @@
Internally, the request/response classes deal with encoding and decoding
BER values.
<p>
For example, suppose an LDAP server supports a "get time" extended operation.
It would supply classes such as
-<tt>GetTimeRequest</tt> and <tt>GetTimeResponse</tt>,
+<code>GetTimeRequest</code> and <code>GetTimeResponse</code>,
so that applications can use this feature.
An application would use these classes as follows:
<blockquote><pre>
GetTimeResponse resp =
(GetTimeResponse) ectx.extendedOperation(new GetTimeRequest());
long time = resp.getTime();
</pre></blockquote>
<p>
-The <tt>GetTimeRequest</tt> and <tt>GetTimeResponse</tt> classes might
+The <code>GetTimeRequest</code> and <code>GetTimeResponse</code> classes might
be defined as follows:
<blockquote><pre>
public class GetTimeRequest implements ExtendedRequest {
// User-friendly constructor
public GetTimeRequest() {
@@ -125,11 +125,11 @@
}
</pre></blockquote>
<h4>Controls</h4>
-This package defines the interface <tt>Control</tt> to represent an LDAPv3
+This package defines the interface <code>Control</code> to represent an LDAPv3
control. It can be a control that is sent to an LDAP server
(<em>request control</em>) or a control returned by an LDAP server
(<em>response control</em>). Unlike extended requests and responses,
there is not necessarily any pairing between request controls and
response controls. You can send request controls and expect no
@@ -148,21 +148,21 @@
encoding and decoding BER values.
<p>
For example, suppose an LDAP server supports a "signed results"
request control, which when sent with a request, asks the
server to digitally sign the results of an operation.
-It would supply a class <tt>SignedResultsControl</tt> so that applications
+It would supply a class <code>SignedResultsControl</code> so that applications
can use this feature.
An application would use this class as follows:
<blockquote>
<pre>
Control[] reqCtls = new Control[] {new SignedResultsControl(Control.CRITICAL)};
ectx.setRequestControls(reqCtls);
NamingEnumeration enum = ectx.search(...);
</pre>
</blockquote>
-The <tt>SignedResultsControl</tt> class might be defined as follows:
+The <code>SignedResultsControl</code> class might be defined as follows:
<blockquote><pre>
public class SignedResultsControl implements Control {
// User-friendly constructor
public SignedResultsControl(boolean criticality) {
// assemble the components of the request control
@@ -178,23 +178,23 @@
...
}
</pre></blockquote>
<p>
When a service provider receives response controls, it uses
-the <tt>ControlFactory</tt> class to produce specific classes
-that implement the <tt>Control</tt> interface.
+the <code>ControlFactory</code> class to produce specific classes
+that implement the <code>Control</code> interface.
<p>
An LDAP server can send back response controls with an LDAP operation
and also with enumeration results, such as those returned
by a list or search operation.
-The <tt>LdapContext</tt> provides a method (<tt>getResponseControls()</tt>)
+The <code>LdapContext</code> provides a method (<code>getResponseControls()</code>)
for getting the response controls sent with an LDAP operation,
-while the <tt>HasControls</tt> interface is used to retrieve
+while the <code>HasControls</code> interface is used to retrieve
response controls associated with enumeration results.
<p>
For example, suppose an LDAP server sends back a "change ID" control in response
-to a successful modification. It would supply a class <tt>ChangeIDControl</tt>
+to a successful modification. It would supply a class <code>ChangeIDControl</code>
so that the application can use this feature.
An application would perform an update, and then try to get the change ID.
<blockquote><pre>
// Perform update
Context ctx = ectx.createSubsubcontext("cn=newobj");
@@ -209,12 +209,12 @@
System.out.println(cctl.getChangeID());
}
}
}
</pre></blockquote>
-The vendor might supply the following <tt>ChangeIDControl</tt> and
-<tt>VendorXControlFactory</tt> classes. The <tt>VendorXControlFactory</tt>
+The vendor might supply the following <code>ChangeIDControl</code> and
+<code>VendorXControlFactory</code> classes. The <code>VendorXControlFactory</code>
will be used by the service provider when the provider receives response
controls from the LDAP server.
<blockquote><pre>
public class ChangeIDControl implements Control {
long id;
< prev index next >