📄 initialldapcontext.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:37:40 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class InitialLdapContext</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/InitialLdapContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/naming/ldap/ControlFactory.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/naming/ldap/UnsolicitedNotificationEvent.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="InitialLdapContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_javax.naming.InitialContext">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.naming.ldap</FONT><BR>Class InitialLdapContext</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<A HREF="../../../javax/naming/InitialContext.html">javax.naming.InitialContext</A> | +--<A HREF="../../../javax/naming/directory/InitialDirContext.html">javax.naming.directory.InitialDirContext</A> | +--<B>javax.naming.ldap.InitialLdapContext</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../javax/naming/Context.html">Context</A>, <A HREF="../../../javax/naming/directory/DirContext.html">DirContext</A>, <A HREF="../../../javax/naming/ldap/LdapContext.html">LdapContext</A></DD></DL><HR><DL><DT>public class <B>InitialLdapContext</B><DT>extends <A HREF="../../../javax/naming/directory/InitialDirContext.html">InitialDirContext</A><DT>implements <A HREF="../../../javax/naming/ldap/LdapContext.html">LdapContext</A></DL><P>This class is the starting context for performing LDAPv3-style extended operations and controls.<p> See <tt>javax.naming.InitialContext</tt> and <tt>javax.naming.InitialDirContext</tt> for details on synchronization, and the policy for how an initial context is created. <h4>Request Controls</h4> When you create an initial context (<tt>InitialLdapContext</tt>), 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 <em>connection request controls</em>. Use <tt>getConnectControls()</tt> to get a context's connection request controls.<p> The request controls supplied to the initial context constructor are <em>not</em> used as the context request controls for subsequent context operations such as searches and lookups. Context request controls are set and updated by using <tt>setRequestControls()</tt>.<p> 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:<blockquote><pre> InitialLdapContext lctx = new InitialLdapContext(env, critConnCtls); lctx.setRequestControls(critModCtls); lctx.modifyAttributes(name, mods); Controls[] respCtls = lctx.getResponseControls();</pre></blockquote> It specifies first the critical controls for creating the initial context (<tt>critConnCtls</tt>), and then sets the context's request controls (<tt>critModCtls</tt>) for the context operation. If for some reason <tt>lctx</tt> needs to reconnect to the server, it will use <tt>critConnCtls</tt>. See the <tt>LdapContext</tt> interface for more discussion about request controls.<p> Service provider implementors should read the "Service Provider" section in the <tt>LdapContext</tt> class description for implementation details.<P><DL><DT><B>Since: </B><DD>1.3</DD><DT><B>See Also: </B><DD><A HREF="../../../javax/naming/ldap/LdapContext.html"><CODE>LdapContext</CODE></A>, <A HREF="../../../javax/naming/InitialContext.html"><CODE>InitialContext</CODE></A>, <A HREF="../../../javax/naming/directory/InitialDirContext.html"><CODE>InitialDirContext</CODE></A>, <A HREF="../../../javax/naming/spi/NamingManager.html#setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)"><CODE>NamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_javax.naming.InitialContext"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class javax.naming.<A HREF="../../../javax/naming/InitialContext.html">InitialContext</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/naming/InitialContext.html#defaultInitCtx">defaultInitCtx</A>, <A HREF="../../../javax/naming/InitialContext.html#gotDefault">gotDefault</A>, <A HREF="../../../javax/naming/InitialContext.html#myProps">myProps</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.naming.ldap.LdapContext"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.naming.ldap.<A HREF="../../../javax/naming/ldap/LdapContext.html">LdapContext</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/naming/ldap/LdapContext.html#CONTROL_FACTORIES">CONTROL_FACTORIES</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.naming.directory.DirContext"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.naming.directory.<A HREF="../../../javax/naming/directory/DirContext.html">DirContext</A></B></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -