This fixes a few JAPI issues with some of my latest patches (and one of Sven's), as well as adding in a method of MBeanInfo that is now possible.
Changelog:
2006-07-16 Andrew John Hughes <[EMAIL PROTECTED]>
* javax/management/MBeanInfo.java:
(getNotifications()): Implemented.
* javax/management/NotificationBroadcaster.java:
(removeNotificationListener(NotificationListener)):
Renamed from removeListener.
* javax/management/NotificationEmitter.java:
(removeNotificationListener(NotificationListener,
NotificationFilter, Object)): Likewise.
* javax/management/NotificationFilter.java:
Implement Serializable.
* javax/management/NotificationListener.java:
Implement java.util.EventListener.
* javax/rmi/ssl/SslRMIClientSocketFactory.java:
Implement Serializable.
--
Andrew :-)
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: javax/management/MBeanInfo.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/MBeanInfo.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 MBeanInfo.java
--- javax/management/MBeanInfo.java 15 Jun 2006 21:18:54 -0000 1.1
+++ javax/management/MBeanInfo.java 16 Jul 2006 20:10:30 -0000
@@ -104,6 +104,13 @@ public class MBeanInfo
private String className;
/**
+ * Descriptions of the notifications emitted by the bean.
+ *
+ * @serial The bean's notifications.
+ */
+ private MBeanNotificationInfo[] notifications;
+
+ /**
* Returns a shallow clone of the information. This is
* simply a new copy of each string and a clone
* of each array, which still references the same objects,
@@ -149,4 +156,21 @@ public class MBeanInfo
return description;
}
+ /**
+ * Returns descriptions of each of the notifications emitted
+ * by this management bean. The returned value is a shallow
+ * copy of the notification array maintained by this instance.
+ * Hence, changing the elements of the returned array will not
+ * affect the notification array, and the elements (instances
+ * of the [EMAIL PROTECTED] MBeanNotificationInfo} class) are immutable.
+ *
+ * @return an array of [EMAIL PROTECTED] MBeanNotificationInfo} objects,
+ * representing the notifications emitted by this
+ * management bean.
+ */
+ public MBeanNotificationInfo[] getNotifications()
+ {
+ return (MBeanNotificationInfo[]) notifications.clone();
+ }
+
}
Index: javax/management/NotificationBroadcaster.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/NotificationBroadcaster.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 NotificationBroadcaster.java
--- javax/management/NotificationBroadcaster.java 16 Jul 2006 14:35:38
-0000 1.1
+++ javax/management/NotificationBroadcaster.java 16 Jul 2006 20:10:30
-0000
@@ -105,7 +105,7 @@ public interface NotificationBroadcaster
* @see #addNotificationListener(NotificationListener, NotificationFilter,
* java.lang.Object)
*/
- void removeListener(NotificationListener listener)
+ void removeNotificationListener(NotificationListener listener)
throws ListenerNotFoundException;
}
Index: javax/management/NotificationEmitter.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/NotificationEmitter.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 NotificationEmitter.java
--- javax/management/NotificationEmitter.java 16 Jul 2006 14:35:38 -0000
1.1
+++ javax/management/NotificationEmitter.java 16 Jul 2006 20:10:30 -0000
@@ -67,9 +67,9 @@ public interface NotificationEmitter
* @see #addNotificationListener(NotificationListener, NotificationFilter,
* java.lang.Object)
*/
- void removeListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ void removeNotificationListener(NotificationListener listener,
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException;
}
Index: javax/management/NotificationFilter.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/NotificationFilter.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 NotificationFilter.java
--- javax/management/NotificationFilter.java 16 Jul 2006 14:35:38 -0000
1.1
+++ javax/management/NotificationFilter.java 16 Jul 2006 20:10:30 -0000
@@ -37,6 +37,8 @@ exception statement from your version. *
package javax.management;
+import java.io.Serializable;
+
/**
* Represents a object that acts as a filter for notifications.
* Implementations of this class are used to determine which
@@ -47,6 +49,7 @@ package javax.management;
* @since 1.5
*/
public interface NotificationFilter
+ extends Serializable
{
/**
Index: javax/management/NotificationListener.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/management/NotificationListener.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 NotificationListener.java
--- javax/management/NotificationListener.java 16 Jul 2006 14:35:38 -0000
1.1
+++ javax/management/NotificationListener.java 16 Jul 2006 20:10:30 -0000
@@ -37,6 +37,8 @@ exception statement from your version. *
package javax.management;
+import java.util.EventListener;
+
/**
* Represents a object that can receive notifications from
* a bean.
@@ -45,6 +47,7 @@ package javax.management;
* @since 1.5
*/
public interface NotificationListener
+ extends EventListener
{
/**
Index: javax/rmi/ssl/SslRMIClientSocketFactory.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/rmi/ssl/SslRMIClientSocketFactory.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 SslRMIClientSocketFactory.java
--- javax/rmi/ssl/SslRMIClientSocketFactory.java 16 Jul 2006 08:07:47
-0000 1.1
+++ javax/rmi/ssl/SslRMIClientSocketFactory.java 16 Jul 2006 20:10:30
-0000
@@ -38,6 +38,8 @@ exception statement from your version. *
package javax.rmi.ssl;
import java.io.IOException;
+import java.io.Serializable;
+
import java.util.StringTokenizer;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.SSLSocket;
@@ -62,8 +64,15 @@ import java.rmi.server.RMIClientSocketFa
* @author Sven de Marothy
* @since 1.5
*/
-public class SslRMIClientSocketFactory implements RMIClientSocketFactory
+public class SslRMIClientSocketFactory
+ implements RMIClientSocketFactory, Serializable
{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = -8310631444933958385L;
+
private String[] enabledCipherSuites, enabledProtocols;
/**
@@ -154,4 +163,4 @@ public class SslRMIClientSocketFactory i
hash = hash ^ enabledProtocols[i].hashCode();
return hash;
}
-}
\ No newline at end of file
+}
signature.asc
Description: Digital signature
