You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by re...@apache.org on 2002/01/15 20:28:47 UTC
cvs commit: jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler BaseModelMBean.java BaseNotificationBroadcaster.java
remm 02/01/15 11:28:46
Modified: modeler/src/java/org/apache/commons/modeler
BaseModelMBean.java
BaseNotificationBroadcaster.java
Log:
- Small addition of methods to allow the modeler to build with OpenJMX.
- According to OpenJMX, those methods are defined in the specification, but
are not present in the RI (although they should be).
- Craig: Are you ok with the patch ? Should I revert it ?
Revision Changes Path
1.2 +68 -3 jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java
Index: BaseModelMBean.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseModelMBean.java 1 Oct 2001 17:38:29 -0000 1.1
+++ BaseModelMBean.java 15 Jan 2002 19:28:46 -0000 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v 1.1 2001/10/01 17:38:29 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2001/10/01 17:38:29 $
+ * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v 1.2 2002/01/15 19:28:46 remm Exp $
+ * $Revision: 1.2 $
+ * $Date: 2002/01/15 19:28:46 $
*
* ====================================================================
*
@@ -122,7 +122,7 @@
* </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2001/10/01 17:38:29 $
+ * @version $Revision: 1.2 $ $Date: 2002/01/15 19:28:46 $
*/
public class BaseModelMBean implements ModelMBean {
@@ -621,6 +621,28 @@
/**
+ * Remove an attribute change notification event listener from
+ * this MBean.
+ *
+ * @param listener The listener to be removed
+ * @param name The attribute name for which no more events are required
+ * @param handback Handback object to be sent along with event
+ * notifications
+ *
+ *
+ * @exception ListenerNotFoundException if this listener is not
+ * registered in the MBean
+ */
+ public void removeAttributeChangeNotificationListener
+ (NotificationListener listener, String attributeName, Object handback)
+ throws ListenerNotFoundException {
+
+ removeAttributeChangeNotificationListener(listener, attributeName);
+
+ }
+
+
+ /**
* Send an <code>AttributeChangeNotification</code> to all registered
* listeners.
*
@@ -831,6 +853,49 @@
generalBroadcaster = new BaseNotificationBroadcaster();
generalBroadcaster.removeNotificationListener(listener);
+
+ }
+
+
+ /**
+ * Remove a notification event listener from this MBean.
+ *
+ * @param listener The listener to be removed (any and all registrations
+ * for this listener will be eliminated)
+ * @param handback Handback object to be sent along with event
+ * notifications
+ *
+ * @exception ListenerNotFoundException if this listener is not
+ * registered in the MBean
+ */
+ public void removeNotificationListener(NotificationListener listener,
+ Object handback)
+ throws ListenerNotFoundException {
+
+ removeNotificationListener(listener);
+
+ }
+
+
+ /**
+ * Remove a notification event listener from this MBean.
+ *
+ * @param listener The listener to be removed (any and all registrations
+ * for this listener will be eliminated)
+ * @param filter Filter object used to filter event notifications
+ * actually delivered, or <code>null</code> for no filtering
+ * @param handback Handback object to be sent along with event
+ * notifications
+ *
+ * @exception ListenerNotFoundException if this listener is not
+ * registered in the MBean
+ */
+ public void removeNotificationListener(NotificationListener listener,
+ NotificationFilter filter,
+ Object handback)
+ throws ListenerNotFoundException {
+
+ removeNotificationListener(listener);
}
1.2 +46 -3 jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseNotificationBroadcaster.java
Index: BaseNotificationBroadcaster.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseNotificationBroadcaster.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseNotificationBroadcaster.java 1 Oct 2001 17:38:29 -0000 1.1
+++ BaseNotificationBroadcaster.java 15 Jan 2002 19:28:46 -0000 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseNotificationBroadcaster.java,v 1.1 2001/10/01 17:38:29 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2001/10/01 17:38:29 $
+ * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseNotificationBroadcaster.java,v 1.2 2002/01/15 19:28:46 remm Exp $
+ * $Revision: 1.2 $
+ * $Date: 2002/01/15 19:28:46 $
*
* ====================================================================
*
@@ -82,7 +82,7 @@
*</p>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2001/10/01 17:38:29 $
+ * @version $Revision: 1.2 $ $Date: 2002/01/15 19:28:46 $
*/
public class BaseNotificationBroadcaster implements NotificationBroadcaster {
@@ -190,6 +190,49 @@
items.remove();
}
}
+
+ }
+
+
+ /**
+ * Remove a notification event listener from this MBean.
+ *
+ * @param listener The listener to be removed (any and all registrations
+ * for this listener will be eliminated)
+ * @param handback Handback object to be sent along with event
+ * notifications
+ *
+ * @exception ListenerNotFoundException if this listener is not
+ * registered in the MBean
+ */
+ public void removeNotificationListener(NotificationListener listener,
+ Object handback)
+ throws ListenerNotFoundException {
+
+ removeNotificationListener(listener);
+
+ }
+
+
+ /**
+ * Remove a notification event listener from this MBean.
+ *
+ * @param listener The listener to be removed (any and all registrations
+ * for this listener will be eliminated)
+ * @param filter Filter object used to filter event notifications
+ * actually delivered, or <code>null</code> for no filtering
+ * @param handback Handback object to be sent along with event
+ * notifications
+ *
+ * @exception ListenerNotFoundException if this listener is not
+ * registered in the MBean
+ */
+ public void removeNotificationListener(NotificationListener listener,
+ NotificationFilter filter,
+ Object handback)
+ throws ListenerNotFoundException {
+
+ removeNotificationListener(listener);
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler
BaseModelMBean.java BaseNotificationBroadcaster.java
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On 15 Jan 2002 remm@apache.org wrote:
> Date: 15 Jan 2002 19:28:47 -0000
> From: remm@apache.org
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: jakarta-commons-sandbox-cvs@apache.org
> Subject: cvs commit:
> jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler
> BaseModelMBean.java BaseNotificationBroadcaster.java
>
> remm 02/01/15 11:28:46
>
> Modified: modeler/src/java/org/apache/commons/modeler
> BaseModelMBean.java
> BaseNotificationBroadcaster.java
> Log:
> - Small addition of methods to allow the modeler to build with OpenJMX.
> - According to OpenJMX, those methods are defined in the specification, but
> are not present in the RI (although they should be).
> - Craig: Are you ok with the patch ? Should I revert it ?
>
I'm fine with this -- I hadn't got as far as needing the notification APIs
yet, so I hadn't noticed that they weren't implemented.
(By the way, feel free to add yourself as a committer in the STATUS file
:-)
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>