This class is the starting context for performing LDAPv3-style extended operations and controls.
javax.naming.InitialDirContext for details on synchronization, and the policy for how an initial context is created.
When you create an initial context (
), you can specify a list of request controls. These controls will be used as the request controls for any implicit LDAP "bind" operation performed by the context or contexts derived from the context. These are called connection request controls
to get a context's connection request controls.
The request controls supplied to the initial context constructor are not used as the context request controls for subsequent context operations such as searches and lookups. Context request controls are set and updated by using
As shown, there can be two different sets of request controls associated with a context: connection request controls and context request controls. This is required for those applications needing to send critical controls that might not be applicable to both the context operation and any implicit LDAP "bind" operation. A typical user program would do the following:
InitialLdapContext lctx = new InitialLdapContext(env, critConnCtls);
Controls respCtls = lctx.getResponseControls();
It specifies first the critical controls for creating the initial context (
), and then sets the context's request controls (
) for the context operation. If for some reason
needs to reconnect to the server, it will use
. See the
interface for more discussion about request controls.
Service provider implementors should read the "Service Provider" section in the
LdapContext class description for implementation details.