⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 namingmanager.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 interface) must be public and must have a public constructor that  accepts no arguments.<DD><DL><DT><B>Parameters:</B><DD><CODE>scheme</CODE> - The non-null scheme-id of the URLs supported by the context.<DD><CODE>environment</CODE> - The possibly null environment properties to be 		 used in the creation of the object factory and the context.<DT><B>Returns:</B><DD>A context for resolving URLs with the          scheme id <code>scheme</code>;  	<code>null</code> if the factory for creating the          context is not found.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a naming exception occurs while creating  	the context.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/spi/NamingManager.html#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)"><CODE>getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)</CODE></A>, <A HREF="../../../javax/naming/spi/ObjectFactory.html#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)"><CODE>ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)</CODE></A></DL></DD></DL><HR><A NAME="getInitialContext(java.util.Hashtable)"><!-- --></A><H3>getInitialContext</H3><PRE>public static <A HREF="../../../javax/naming/Context.html">Context</A> <B>getInitialContext</B>(<A HREF="../../../java/util/Hashtable.html">Hashtable</A>&nbsp;env)                                 throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Creates an initial context using the specified environment  properties. <p> If an InitialContextFactoryBuilder has been installed,  it is used to create the factory for creating the initial context. Otherwise, the class specified in the  <tt>Context.INITIAL_CONTEXT_FACTORY</tt> environment property is used. Note that an initial context factory (an object that implements the  InitialContextFactory interface) must be public and must have a  public constructor that accepts no arguments.<DD><DL><DT><B>Parameters:</B><DD><CODE>env</CODE> - The possibly null environment properties used when  			creating the context.<DT><B>Returns:</B><DD>A non-null initial context.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NoInitialContextException.html">NoInitialContextException</A></CODE> - If the		<tt>Context.INITIAL_CONTEXT_FACTORY</tt> property         is not found or names a nonexistent         class or a class that cannot be instantiated,		or if the initial context could not be created for some other		reason.<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If some other naming exception was encountered.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/InitialContext.html"><CODE>InitialContext</CODE></A>, <A HREF="../../../javax/naming/directory/InitialDirContext.html"><CODE>InitialDirContext</CODE></A></DL></DD></DL><HR><A NAME="setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)"><!-- --></A><H3>setInitialContextFactoryBuilder</H3><PRE>public static void <B>setInitialContextFactoryBuilder</B>(<A HREF="../../../javax/naming/spi/InitialContextFactoryBuilder.html">InitialContextFactoryBuilder</A>&nbsp;builder)                                            throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Sets the InitialContextFactory builder to be builder.<p> The builder can only be installed if the executing thread is allowed by the security manager to do so. Once installed, the builder cannot  be replaced.<DD><DL><DT><B>Parameters:</B><DD><CODE>builder</CODE> - The initial context factory builder to install. If null,                no builder is set.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/SecurityException.html">SecurityException</A></CODE> - builder cannot be installed for security			reasons.<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - Factory build cannot be installed for         a non-security-related reason.<DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - If a builder was previous installed.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/spi/NamingManager.html#hasInitialContextFactoryBuilder()"><CODE>hasInitialContextFactoryBuilder()</CODE></A>, <A HREF="../../../java/lang/SecurityManager.html#checkSetFactory()"><CODE>SecurityManager.checkSetFactory()</CODE></A></DL></DD></DL><HR><A NAME="hasInitialContextFactoryBuilder()"><!-- --></A><H3>hasInitialContextFactoryBuilder</H3><PRE>public static boolean <B>hasInitialContextFactoryBuilder</B>()</PRE><DL><DD>Determines whether an initial context factory builder has been set.<DD><DL><DT><B>Returns:</B><DD>true if an initial context factory builder has		 been set; false otherwise.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/spi/NamingManager.html#setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)"><CODE>setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder)</CODE></A></DL></DD></DL><HR><A NAME="getContinuationContext(javax.naming.CannotProceedException)"><!-- --></A><H3>getContinuationContext</H3><PRE>public static <A HREF="../../../javax/naming/Context.html">Context</A> <B>getContinuationContext</B>(<A HREF="../../../javax/naming/CannotProceedException.html">CannotProceedException</A>&nbsp;cpe)                                      throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Creates a context in which to continue a context operation.<p> In performing an operation on a name that spans multiple namespaces, a context from one naming system may need to pass the operation on to the next naming system.  The context implementation does this by first constructing a <code>CannotProceedException</code> containing information pinpointing how far it has proceeded.  It then obtains a continuation context from JNDI by calling <code>getContinuationContext</code>.  The context implementation should then resume the context operation by invoking the same operation on the continuation context, using the remainder of the name that has not yet been resolved.<p> Before making use of the <tt>cpe</tt> parameter, this method updates the environment associated with that object by setting the value of the property <a href="#CPE"><tt>CPE</tt></a> to <tt>cpe</tt>.  This property will be inherited by the continuation context, and may be used by that context's service provider to inspect the fields of this exception.<DD><DL><DT><B>Parameters:</B><DD><CODE>cpe</CODE> - The non-null exception that triggered this continuation.<DT><B>Returns:</B><DD>A non-null Context object for continuing the operation.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a naming exception occurred.</DL></DD></DL><HR><A NAME="getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)"><!-- --></A><H3>getStateToBind</H3><PRE>public static <A HREF="../../../java/lang/Object.html">Object</A> <B>getStateToBind</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj,                                    <A HREF="../../../javax/naming/Name.html">Name</A>&nbsp;name,                                    <A HREF="../../../javax/naming/Context.html">Context</A>&nbsp;nameCtx,                                    <A HREF="../../../java/util/Hashtable.html">Hashtable</A>&nbsp;environment)                             throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves the state of an object for binding. <p> Service providers that implement the <tt>DirContext</tt> interface should use <tt>DirectoryManager.getStateToBind()</tt>, not this method. Service providers that implement only the <tt>Context</tt> interface should use this method.<p> This method uses the specified state factories in  the <tt>Context.STATE_FACTORIES</tt> property from the environment properties, and from the provider resource file associated with <tt>nameCtx</tt>, in that order.    The value of this property is a colon-separated list of factory    class names that are tried in order, and the first one that succeeds    in returning the object's state is the one used. If no object's state can be retrieved in this way, return the object itself.    If an exception is encountered while retrieving the state, the    exception is passed up to the caller.</ol> <p> Note that a state factory  (an object that implements the StateFactory interface) must be public and must have a public constructor that  accepts no arguments. <p> The <code>name</code> and <code>nameCtx</code> parameters may optionally be used to specify the name of the object being created. See the description of "Name and Context Parameters" in <A HREF="../../../javax/naming/spi/ObjectFactory.html#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)"><CODE>ObjectFactory.getObjectInstance()</CODE></A> for details. <p> This method may return a <tt>Referenceable</tt> object.  The service provider obtaining this object may choose to store it directly, or to extract its reference (using <tt>Referenceable.getReference()</tt>) and store that instead.<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - The non-null object for which to get state to bind.<DD><CODE>name</CODE> - The name of this object relative to <code>nameCtx</code>,		or null if no name is specified.<DD><CODE>nameCtx</CODE> - The context relative to which the <code>name</code>		parameter is specified, or null if <code>name</code> is		relative to the default initial context.<DD><CODE>environment</CODE> - The possibly null environment to 		be used in the creation of the state factory and  	the object's state.<DT><B>Returns:</B><DD>The non-null object representing <tt>obj</tt>'s state for 	binding.  It could be the object (<tt>obj</tt>) itself.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If one of the factories accessed throws an		exception, or if an error was encountered while loading	        and instantiating the factory and object classes.		A factory should only throw an exception if it does not want		other factories to be used in an attempt to create an object. 	See <tt>StateFactory.getStateToBind()</tt>.<DT><B>Since: </B><DD>1.3</DD><DT><B>See Also: </B><DD><A HREF="../../../javax/naming/spi/StateFactory.html"><CODE>StateFactory</CODE></A>, <A HREF="../../../javax/naming/spi/StateFactory.html#getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)"><CODE>StateFactory.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)</CODE></A>, <A HREF="../../../javax/naming/spi/DirectoryManager.html#getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)"><CODE>DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, javax.naming.directory.Attributes)</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/NamingManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/naming/spi/DirStateFactory.Result.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/naming/spi/ResolveResult.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>  &nbsp;&nbsp;<A HREF="NamingManager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -