incubator-river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_firmst...@apache.org
Subject svn commit: r935130 - in /incubator/river/jtsk/trunk/src/net/jini/core: event/RemoteEvent.java lookup/ServiceEvent.java lookup/StreamingServiceRegistrar.java
Date Sat, 17 Apr 2010 05:12:19 GMT
Author: peter_firmstone
Date: Sat Apr 17 05:12:18 2010
New Revision: 935130

URL: http://svn.apache.org/viewvc?rev=935130&view=rev
Log:
New signatures containing MarshalledInstance were too similar to those containing MarshalledObject,
such that when a null parameter was given by client code, the correct method signature to
select was ambiguous and caused a compile time error.

New signatures changed slightly to avoid ambiguous matches.

Modified:
    incubator/river/jtsk/trunk/src/net/jini/core/event/RemoteEvent.java
    incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceEvent.java
    incubator/river/jtsk/trunk/src/net/jini/core/lookup/StreamingServiceRegistrar.java

Modified: incubator/river/jtsk/trunk/src/net/jini/core/event/RemoteEvent.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/core/event/RemoteEvent.java?rev=935130&r1=935129&r2=935130&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/core/event/RemoteEvent.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/core/event/RemoteEvent.java Sat Apr 17 05:12:18
2010
@@ -171,8 +171,8 @@ public class RemoteEvent extends java.ut
      * @param handback  a <tt>MarshalledInstance</tt> that was passed in 
      *                  as part of the original event registration.
      */
-    public RemoteEvent(Object source, long eventID, long seqNum,
-		       MarshalledInstance handback) {
+    public RemoteEvent(MarshalledInstance handback, Object source, long eventID,
+            long seqNum ) {
 	super(source);
         this.source = source;
         this.eventID = eventID;

Modified: incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceEvent.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceEvent.java?rev=935130&r1=935129&r2=935130&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceEvent.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceEvent.java Sat Apr 17 05:12:18
2010
@@ -85,14 +85,14 @@ public abstract class ServiceEvent exten
      * @param serviceID the serviceID of the item that triggered the event
      * @param transition the transition that triggered the event
      */
-    public ServiceEvent(Object source,
+    public ServiceEvent(MarshalledInstance handback,
+                        Object source,
 			long eventID,
 			long seqNo,
-			MarshalledInstance handback,
 			ServiceID serviceID,
 			int transition)
     {
-	super(source, eventID, seqNo, handback);
+	super(handback, source, eventID, seqNo);
 	this.serviceID = serviceID;
 	this.transition = transition;
     }

Modified: incubator/river/jtsk/trunk/src/net/jini/core/lookup/StreamingServiceRegistrar.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/core/lookup/StreamingServiceRegistrar.java?rev=935130&r1=935129&r2=935130&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/core/lookup/StreamingServiceRegistrar.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/core/lookup/StreamingServiceRegistrar.java Sat
Apr 17 05:12:18 2010
@@ -18,9 +18,9 @@
 package net.jini.core.lookup;
 
 import java.rmi.RemoteException;
-import net.jini.io.CDCMarshalledObject;
 import net.jini.core.event.EventRegistration;
 import net.jini.core.event.RemoteEventListener;
+import net.jini.io.MarshalledInstance;
 
 /**
  *
@@ -40,6 +40,10 @@ public interface StreamingServiceRegistr
      * the specified listener whenever a register, lease cancellation or
      * expiration, or attribute change operation results in an item changing
      * state in a way that satisfies the template and transition combination.
+      * <p>
+      * The method signature varies slightly from ServiceRegistar in case
+      * a class implements both method signatures and a caller used a null
+      * MarshalledInstance, the call would be ambiguious.
      *
      * @param tmpl template to match
      * @param transitions bitwise OR of any non-empty set of transition values
@@ -50,10 +54,10 @@ public interface StreamingServiceRegistr
      *         specified remote listener
      * @throws java.rmi.RemoteException
      */
-    EventRegistration notify(ServiceTemplate tmpl,
+    EventRegistration notify(MarshalledInstance handback,
+                             ServiceTemplate tmpl,
 			     int transitions,
 			     RemoteEventListener listener,
-			     CDCMarshalledObject handback,
 			     long leaseDuration)
 	throws RemoteException;
 }



Mime
View raw message