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

📄 eventcontext.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
                  int&nbsp;scope,                  <A HREF="../../../javax/naming/event/NamingListener.html">NamingListener</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener for receiving naming events fired when the object named by the string target name and scope changes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/naming/event/EventContext.html#removeNamingListener(javax.naming.event.NamingListener)">removeNamingListener</A></B>(<A HREF="../../../javax/naming/event/NamingListener.html">NamingListener</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a listener from receiving naming events fired by this <tt>EventContext</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/naming/event/EventContext.html#targetMustExist()">targetMustExist</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether a listener can register interest in a target that does not exist.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.naming.Context"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.naming.<A HREF="../../../javax/naming/Context.html">Context</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/naming/Context.html#addToEnvironment(java.lang.String, java.lang.Object)">addToEnvironment</A>, <A HREF="../../../javax/naming/Context.html#bind(javax.naming.Name, java.lang.Object)">bind</A>, <A HREF="../../../javax/naming/Context.html#bind(java.lang.String, java.lang.Object)">bind</A>, <A HREF="../../../javax/naming/Context.html#close()">close</A>, <A HREF="../../../javax/naming/Context.html#composeName(javax.naming.Name, javax.naming.Name)">composeName</A>, <A HREF="../../../javax/naming/Context.html#composeName(java.lang.String, java.lang.String)">composeName</A>, <A HREF="../../../javax/naming/Context.html#createSubcontext(javax.naming.Name)">createSubcontext</A>, <A HREF="../../../javax/naming/Context.html#createSubcontext(java.lang.String)">createSubcontext</A>, <A HREF="../../../javax/naming/Context.html#destroySubcontext(javax.naming.Name)">destroySubcontext</A>, <A HREF="../../../javax/naming/Context.html#destroySubcontext(java.lang.String)">destroySubcontext</A>, <A HREF="../../../javax/naming/Context.html#getEnvironment()">getEnvironment</A>, <A HREF="../../../javax/naming/Context.html#getNameInNamespace()">getNameInNamespace</A>, <A HREF="../../../javax/naming/Context.html#getNameParser(javax.naming.Name)">getNameParser</A>, <A HREF="../../../javax/naming/Context.html#getNameParser(java.lang.String)">getNameParser</A>, <A HREF="../../../javax/naming/Context.html#list(javax.naming.Name)">list</A>, <A HREF="../../../javax/naming/Context.html#list(java.lang.String)">list</A>, <A HREF="../../../javax/naming/Context.html#listBindings(javax.naming.Name)">listBindings</A>, <A HREF="../../../javax/naming/Context.html#listBindings(java.lang.String)">listBindings</A>, <A HREF="../../../javax/naming/Context.html#lookup(javax.naming.Name)">lookup</A>, <A HREF="../../../javax/naming/Context.html#lookup(java.lang.String)">lookup</A>, <A HREF="../../../javax/naming/Context.html#lookupLink(javax.naming.Name)">lookupLink</A>, <A HREF="../../../javax/naming/Context.html#lookupLink(java.lang.String)">lookupLink</A>, <A HREF="../../../javax/naming/Context.html#rebind(javax.naming.Name, java.lang.Object)">rebind</A>, <A HREF="../../../javax/naming/Context.html#rebind(java.lang.String, java.lang.Object)">rebind</A>, <A HREF="../../../javax/naming/Context.html#removeFromEnvironment(java.lang.String)">removeFromEnvironment</A>, <A HREF="../../../javax/naming/Context.html#rename(javax.naming.Name, javax.naming.Name)">rename</A>, <A HREF="../../../javax/naming/Context.html#rename(java.lang.String, java.lang.String)">rename</A>, <A HREF="../../../javax/naming/Context.html#unbind(javax.naming.Name)">unbind</A>, <A HREF="../../../javax/naming/Context.html#unbind(java.lang.String)">unbind</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="OBJECT_SCOPE"><!-- --></A><H3>OBJECT_SCOPE</H3><PRE>public static final int <B>OBJECT_SCOPE</B></PRE><DL><DD>Constant for expressing interest in events concerning the object named  by the target.<p> The value of this constant is <tt>0</tt>.</DL><HR><A NAME="ONELEVEL_SCOPE"><!-- --></A><H3>ONELEVEL_SCOPE</H3><PRE>public static final int <B>ONELEVEL_SCOPE</B></PRE><DL><DD>Constant for expressing interest in events concerning objects  in the context named by the target,  excluding the context named by the target.<p> The value of this constant is <tt>1</tt>.</DL><HR><A NAME="SUBTREE_SCOPE"><!-- --></A><H3>SUBTREE_SCOPE</H3><PRE>public static final int <B>SUBTREE_SCOPE</B></PRE><DL><DD>Constant for expressing interest in events concerning objects  in the subtree of the object named by the target, including the object named by the target.<p> The value of this constant is <tt>2</tt>.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener)"><!-- --></A><H3>addNamingListener</H3><PRE>public void <B>addNamingListener</B>(<A HREF="../../../javax/naming/Name.html">Name</A>&nbsp;target,                              int&nbsp;scope,                              <A HREF="../../../javax/naming/event/NamingListener.html">NamingListener</A>&nbsp;l)                       throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes. The event source of those events is this context. See the class description for a discussion on event source and target. See the descriptions of the constants <tt>OBJECT_SCOPE</tt>, <tt>ONELEVEL_SCOPE</tt>, and <tt>SUBTREE_SCOPE</tt> to see how <tt>scope</tt> affects the registration.<p> <tt>target</tt> needs to name a context only when <tt>scope</tt> is  <tt>ONELEVEL_SCOPE</tt>. <tt>target</tt> may name a non-context if <tt>scope</tt> is either  <tt>OBJECT_SCOPE</tt> or <tt>SUBTREE_SCOPE</tt>.  Using  <tt>SUBTREE_SCOPE</tt> for a non-context might be useful, for example, if the caller does not know in advance whether <tt>target</tt>  is a context and just wants to register interest in the (possibly degenerate subtree) rooted at <tt>target</tt>.<p> When the listener is notified of an event, the listener may in invoked in a thread other than the one in which <tt>addNamingListener()</tt> is executed. Care must be taken when multiple threads are accessing the same <tt>EventContext</tt> concurrently. See the <a href=package-summary.html#THREADING>package description</a> for more information on threading issues.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>target</CODE> - A nonnull name to be resolved relative to this context.<DD><CODE>scope</CODE> - One of <tt>OBJECT_SCOPE</tt>, <tt>ONELEVEL_SCOPE</tt>, or <tt>SUBTREE_SCOPE</tt>.<DD><CODE>l</CODE> - The nonnull listener.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a problem was encountered while adding the listener.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/event/EventContext.html#removeNamingListener(javax.naming.event.NamingListener)"><CODE>removeNamingListener(javax.naming.event.NamingListener)</CODE></A></DL></DD></DL><HR><A NAME="addNamingListener(java.lang.String, int, javax.naming.event.NamingListener)"><!-- --></A><H3>addNamingListener</H3><PRE>public void <B>addNamingListener</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;target,                              int&nbsp;scope,                              <A HREF="../../../javax/naming/event/NamingListener.html">NamingListener</A>&nbsp;l)                       throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Adds a listener for receiving naming events fired when the object named by the string target name and scope changes. See the overload that accepts a <tt>Name</tt> for details.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>target</CODE> - The nonnull string name of the object resolved relative  to this context.<DD><CODE>scope</CODE> - One of <tt>OBJECT_SCOPE</tt>, <tt>ONELEVEL_SCOPE</tt>, or <tt>SUBTREE_SCOPE</tt>.<DD><CODE>l</CODE> - The nonnull listener.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a problem was encountered while adding the listener.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/event/EventContext.html#removeNamingListener(javax.naming.event.NamingListener)"><CODE>removeNamingListener(javax.naming.event.NamingListener)</CODE></A></DL></DD></DL><HR><A NAME="removeNamingListener(javax.naming.event.NamingListener)"><!-- --></A><H3>removeNamingListener</H3><PRE>public void <B>removeNamingListener</B>(<A HREF="../../../javax/naming/event/NamingListener.html">NamingListener</A>&nbsp;l)                          throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Removes a listener from receiving naming events fired by this <tt>EventContext</tt>. The listener may have registered more than once with this <tt>EventContext</tt>, perhaps with different target/scope arguments. After this method is invoked, the listener will no longer receive events with this <tt>EventContext</tt> instance  as the event source (except for those events already in the process of being dispatched). If the listener was not, or is no longer, registered with  this <tt>EventContext</tt> instance, this method does not do anything.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - The nonnull listener.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a problem was encountered while removing the listener.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/event/EventContext.html#addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener)"><CODE>addNamingListener(javax.naming.Name, int, javax.naming.event.NamingListener)</CODE></A></DL></DD></DL><HR><A NAME="targetMustExist()"><!-- --></A><H3>targetMustExist</H3><PRE>public boolean <B>targetMustExist</B>()                        throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Determines whether a listener can register interest in a target that does not exist.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the target must exist; false if the target need not exist.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If the context's behavior in this regard cannot be determined.</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/EventContext.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;PREV CLASS&nbsp;&nbsp;<A HREF="../../../javax/naming/event/EventDirContext.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="EventContext.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 + -