📄 notificationbroadcastersupport.html
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="NotificationBroadcasterSupport()"><!-- --></A><H3>NotificationBroadcasterSupport</H3><PRE>public <B>NotificationBroadcasterSupport</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)"><!-- --></A><H3>addNotificationListener</H3><PRE>public void <B>addNotificationListener</B>(<A HREF="../../javax/management/NotificationListener.html" title="interface in javax.management">NotificationListener</A> listener, <A HREF="../../javax/management/NotificationFilter.html" title="interface in javax.management">NotificationFilter</A> filter, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> handback)</PRE><DL><DD>Adds a listener.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/NotificationBroadcaster.html#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)">addNotificationListener</A></CODE> in interface <CODE><A HREF="../../javax/management/NotificationBroadcaster.html" title="interface in javax.management">NotificationBroadcaster</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to receive notifications.<DD><CODE>filter</CODE> - The filter object. If filter is null, no filtering will be performed before handling notifications.<DD><CODE>handback</CODE> - An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - thrown if the istener is null.<DT><B>See Also:</B><DD><A HREF="../../javax/management/NotificationBroadcasterSupport.html#removeNotificationListener(javax.management.NotificationListener)"><CODE>removeNotificationListener(javax.management.NotificationListener)</CODE></A></DL></DD></DL><HR><A NAME="removeNotificationListener(javax.management.NotificationListener)"><!-- --></A><H3>removeNotificationListener</H3><PRE>public void <B>removeNotificationListener</B>(<A HREF="../../javax/management/NotificationListener.html" title="interface in javax.management">NotificationListener</A> listener) throws <A HREF="../../javax/management/ListenerNotFoundException.html" title="class in javax.management">ListenerNotFoundException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/NotificationBroadcaster.html" title="interface in javax.management">NotificationBroadcaster</A></CODE></B></DD><DD>Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/NotificationBroadcaster.html#removeNotificationListener(javax.management.NotificationListener)">removeNotificationListener</A></CODE> in interface <CODE><A HREF="../../javax/management/NotificationBroadcaster.html" title="interface in javax.management">NotificationBroadcaster</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - A listener that was previously added to this MBean.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/ListenerNotFoundException.html" title="class in javax.management">ListenerNotFoundException</A></CODE> - The listener is not registered with the MBean.<DT><B>See Also:</B><DD><A HREF="../../javax/management/NotificationBroadcaster.html#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)"><CODE>NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)</CODE></A>, <A HREF="../../javax/management/NotificationEmitter.html#removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)"><CODE>NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)"><!-- --></A><H3>removeNotificationListener</H3><PRE>public void <B>removeNotificationListener</B>(<A HREF="../../javax/management/NotificationListener.html" title="interface in javax.management">NotificationListener</A> listener, <A HREF="../../javax/management/NotificationFilter.html" title="interface in javax.management">NotificationFilter</A> filter, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> handback) throws <A HREF="../../javax/management/ListenerNotFoundException.html" title="class in javax.management">ListenerNotFoundException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/NotificationEmitter.html" title="interface in javax.management">NotificationEmitter</A></CODE></B></DD><DD><p>Removes a listener from this MBean. The MBean must have a listener that exactly matches the given <code>listener</code>, <code>filter</code>, and <code>handback</code> parameters. If there is more than one such listener, only one is removed.</p> <p>The <code>filter</code> and <code>handback</code> parameters may be null if and only if they are null in a listener to be removed.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/NotificationEmitter.html#removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)">removeNotificationListener</A></CODE> in interface <CODE><A HREF="../../javax/management/NotificationEmitter.html" title="interface in javax.management">NotificationEmitter</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - A listener that was previously added to this MBean.<DD><CODE>filter</CODE> - The filter that was specified when the listener was added.<DD><CODE>handback</CODE> - The handback that was specified when the listener was added.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/ListenerNotFoundException.html" title="class in javax.management">ListenerNotFoundException</A></CODE> - The listener is not registered with the MBean, or it is not registered with the given filter and handback.</DL></DD></DL><HR><A NAME="getNotificationInfo()"><!-- --></A><H3>getNotificationInfo</H3><PRE>public <A HREF="../../javax/management/MBeanNotificationInfo.html" title="class in javax.management">MBeanNotificationInfo</A>[] <B>getNotificationInfo</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/NotificationBroadcaster.html" title="interface in javax.management">NotificationBroadcaster</A></CODE></B></DD><DD><p>Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.</p> <p>It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/NotificationBroadcaster.html#getNotificationInfo()">getNotificationInfo</A></CODE> in interface <CODE><A HREF="../../javax/management/NotificationBroadcaster.html" title="interface in javax.management">NotificationBroadcaster</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the array of possible notifications.</DL></DD></DL><HR><A NAME="sendNotification(javax.management.Notification)"><!-- --></A><H3>sendNotification</H3><PRE>public void <B>sendNotification</B>(<A HREF="../../javax/management/Notification.html" title="class in javax.management">Notification</A> notification)</PRE><DL><DD>Sends a notification.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>notification</CODE> - The notification to send.</DL></DD></DL><HR><A NAME="handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object)"><!-- --></A><H3>handleNotification</H3><PRE>protected void <B>handleNotification</B>(<A HREF="../../javax/management/NotificationListener.html" title="interface in javax.management">NotificationListener</A> listener, <A HREF="../../javax/management/Notification.html" title="class in javax.management">Notification</A> notif, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> handback)</PRE><DL><DD><p>This method is called by <A HREF="../../javax/management/NotificationBroadcasterSupport.html#sendNotification(javax.management.Notification)"><CODE>sendNotification</CODE></A> for each listener in order to send the notification to that listener. It can be overridden in subclasses to change the behaviour of notification delivery, for instance to deliver the notification in a separate thread.</p> <p>It is not guaranteed that this method is called by the same thread as the one that called <A HREF="../../javax/management/NotificationBroadcasterSupport.html#sendNotification(javax.management.Notification)"><CODE>sendNotification</CODE></A>.</p> <p>The default implementation of this method is equivalent to <pre> listener.handleNotification(notif, handback); </pre><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to which the notification is being delivered.<DD><CODE>notif</CODE> - the notification being delivered to the listener.<DD><CODE>handback</CODE> - the handback object that was supplied when the listener was added.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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="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-all.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>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/management/Notification.html" title="class in javax.management"><B>PREV CLASS</B></A> <A HREF="../../javax/management/NotificationFilterSupport.html" title="class in javax.management"><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="NotificationBroadcasterSupport.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -