You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by pe...@apache.org on 2011/01/31 12:11:01 UTC

svn commit: r1065559 - in /incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup: MarshalledServiceItem.java ServiceResultStreamUnmarshaller.java

Author: peter_firmstone
Date: Mon Jan 31 11:11:01 2011
New Revision: 1065559

URL: http://svn.apache.org/viewvc?rev=1065559&view=rev
Log:
Minor changes to MarshalledServiceItem, thanks Dan.

Modified:
    incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/MarshalledServiceItem.java
    incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/ServiceResultStreamUnmarshaller.java

Modified: incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/MarshalledServiceItem.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/MarshalledServiceItem.java?rev=1065559&r1=1065558&r2=1065559&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/MarshalledServiceItem.java (original)
+++ incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/MarshalledServiceItem.java Mon Jan 31 11:11:01 2011
@@ -53,17 +53,10 @@ public abstract class MarshalledServiceI
         super(id, (Object) null, unmarshalledEntries);
     }
     /**
-     * Unmarshall the service proxy. 
-     * @param load service with local or existing CodeSource or null for
-     * default.
-     * @return the service proxy, null if class not found.
+     * Unmarshall the ServiceItem.  The returned ServiceItem may have a null service 
+     * or entries , if unmarshalling is unsuccessful.
+     *
+     * @return ServiceItem, totally unmarshalled.
      */
-    public abstract Object getService(CodeSource[] code);
-    /**
-     * Unmarshall the Entry's
-     * @return array of Entry's, null entry in array for any class not found.
-     */
-    public abstract Entry[] getEntries();
-    
-    public abstract URI[] getAnnotations();
+    public abstract ServiceItem unmarshall();
 }

Modified: incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/ServiceResultStreamUnmarshaller.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/ServiceResultStreamUnmarshaller.java?rev=1065559&r1=1065558&r2=1065559&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/ServiceResultStreamUnmarshaller.java (original)
+++ incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/ServiceResultStreamUnmarshaller.java Mon Jan 31 11:11:01 2011
@@ -36,7 +36,6 @@ import net.jini.core.lookup.*;
  */
 public class ServiceResultStreamUnmarshaller implements ResultStream<ServiceItem> {
     private final ResultStream input;
-    private final CodeSource[] codebase;
     
     /** 
      * Note the methods of ServiceResultStreamUnmarshaller, implement the 
@@ -44,10 +43,8 @@ public class ServiceResultStreamUnmarsha
      * doesn't to ensure type safety at the client, where runtime binding 
      * prevents the compiler from checking the type.
      */ 
-    public ServiceResultStreamUnmarshaller(ResultStream rs, CodeSource[] cs){
+    public ServiceResultStreamUnmarshaller(ResultStream rs){
         input = rs;
-	if (cs == null) { cs = new CodeSource[0];}
-	codebase = cs;
     }
 
     public ServiceItem get() throws IOException {
@@ -55,9 +52,7 @@ public class ServiceResultStreamUnmarsha
         for(Object item = input.get(); item != null; item = input.get()) {
             if (item instanceof MarshalledServiceItem){
                 MarshalledServiceItem msi = (MarshalledServiceItem) item;
-                ServiceItem it = new ServiceItem(msi.serviceID, msi.getService(codebase),
-                        msi.getEntries());
-                return it;
+                return msi.unmarshall();
             } else if (item instanceof ServiceItem) {
 		return (ServiceItem) item;
 	    }