hashMaps instead of just one object

jg253 [2002-03-20 02:40:59]
hashMaps instead of just one object
Filename
proc/nrl/NRLProcessData.java
proc/nrl/NRLProcessor.java
diff --git a/proc/nrl/NRLProcessData.java b/proc/nrl/NRLProcessData.java
index 554efee..6464b2a 100644
--- a/proc/nrl/NRLProcessData.java
+++ b/proc/nrl/NRLProcessData.java
@@ -1,6 +1,7 @@
 package psl.survivor.proc.nrl;

 import java.util.Hashtable;
+import java.util.HashMap;
 import java.io.Serializable;

 /**
@@ -12,7 +13,7 @@ import java.io.Serializable;
 public class NRLProcessData implements Serializable {

     /** The parameter that gets passed */
-    public Object param = null;
+    public HashMap param = null;

   /** workflow identifier */
   public String workflowName = null;
diff --git a/proc/nrl/NRLProcessor.java b/proc/nrl/NRLProcessor.java
index 91942bb..3522cd6 100644
--- a/proc/nrl/NRLProcessor.java
+++ b/proc/nrl/NRLProcessor.java
@@ -24,6 +24,7 @@ import java.io.FilenameFilter;
 import java.io.FileInputStream;

 import java.util.HashSet;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Hashtable;

@@ -60,7 +61,7 @@ public class NRLProcessor extends Processor {

   // BEGIN: Inherited from psl.survivor.proc.Processor /////////////////////////

-    private static Object _latestParam;
+    private static HashMap _latestParam;

   /** Initialise and setup processor */
   public NRLProcessor(String name, int tcpPort, String rmiName,
@@ -90,7 +91,8 @@ public class NRLProcessor extends Processor {
     final NRLProcessData processData = (NRLProcessData) theTask.data2();

     // TODO Modify nrl's code to not use RMI, and get rid of this
-    _latestParam = processData.param;
+
+    _latestParam.putAll(processData.param);

     final Object instanceId = processData.instanceId;
     try {
@@ -387,12 +389,12 @@ public class NRLProcessor extends Processor {
     }
   }

-    public static void setObject(Object o) {
-	_latestParam = o;
+    public static void setObject(String key, Object o) {
+	_latestParam.put(key, o);
     }

-    public static Object getObject() {
-	return _latestParam;
+    public static Object getObject(String key) {
+	return _latestParam.get(key);
     }

 }