|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
javax.naming.InitialContext
![]()
![]()
![]()
javax.naming.directory.InitialDirContext
![]()
![]()
![]()
javax.naming.ldap.InitialLdapContext
, DirContext
, LdapContext

public class InitialLdapContext


This class is the starting context for performing LDAPv3-style extended operations and controls.
See javax.naming.InitialContext and javax.naming.InitialDirContext for details on synchronization, and the policy for how an initial context is created.
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 setRequestControls().
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:
It specifies first the critical controls for creating the initial context (critConnCtls), and then sets the context's request controls (critModCtls) for the context operation. If for some reason lctx needs to reconnect to the server, it will use critConnCtls. See the LdapContext interface for more discussion about request controls.InitialLdapContext lctx = new InitialLdapContext(env, critConnCtls); lctx.setRequestControls(critModCtls); lctx.modifyAttributes(name, mods); Controls[] respCtls = lctx.getResponseControls();
Service provider implementors should read the "Service Provider" section in the LdapContext class description for implementation details.
LdapContext
,
InitialContext
,
InitialDirContext
,
NamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)

| Field Summary |
|---|
Fields inherited from class javax.naming.InitialContext ![]() |
|---|
defaultInitCtx |
Fields inherited from interface javax.naming.ldap.LdapContext ![]() |
|---|
CONTROL_FACTORIES |
Fields inherited from interface javax.naming.directory.DirContext ![]() |
|---|
ADD_ATTRIBUTE |
Fields inherited from interface javax.naming.Context ![]() |
|---|
APPLET |
| Constructor Summary | |
|---|---|
InitialLdapContext
Constructs an initial context using no environment properties or connection request controls. |
|
InitialLdapContext
Constructs an initial context using environment properties and connection request controls. |
|
| Method Summary | |
|---|---|
ExtendedResponse |
extendedOperation
Performs an extended operation. |
Control |
getConnectControls
Retrieves the connection request controls in effect for this context. |
Control |
getRequestControls
Retrieves the request controls in effect for this context. |
Control |
getResponseControls
Retrieves the response controls produced as a result of the last method invoked on this context. |
LdapContext |
newInstance
Creates a new instance of this context initialized using request controls. |
void |
reconnect
Reconnects to the LDAP server using the supplied controls and this context's environment. |
void |
setRequestControls
Sets the request controls for methods subsequently invoked on this context. |
Methods inherited from class javax.naming.directory.InitialDirContext ![]() |
|---|
bind |
Methods inherited from class javax.naming.InitialContext ![]() |
|---|
addToEnvironment |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
Methods inherited from interface javax.naming.directory.DirContext ![]() |
|---|
bind |