You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/12 17:23:08 UTC

svn commit: r232310 [71/92] - in /beehive/trunk/controls/test: common/ infra/gtlf/ infra/gtlf/xsl/ infra/mantis/ infra/tch/ infra/tch/messages/ infra/tch/runtime/ infra/tch/schema/ perf/ perf/bin/ perf/cases/ perf/ctlsrc/org/apache/beehive/controls/per...

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerManager.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerManager.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerManager.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerManager.java Fri Aug 12 08:12:28 2005
@@ -1,194 +1,194 @@
-package org.apache.beehive.test.tools.tch.extension.process.listener;
-
-import java.rmi.Naming;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.apache.beehive.test.tools.tch.core.remote.ExecTask;
-import org.apache.beehive.test.tools.tch.core.remote.ProcessSummary;
-import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunner;
-import org.apache.beehive.test.tools.tch.util.TchConstants;
-import org.apache.beehive.test.tools.tch.util.TchUtils;
-import org.apache.beehive.test.tools.tch.util.GeneralUtil;
-
-// stand-alone utility to manage listener, get information about processes
-// it started, and shut everything down.
-
-// FIXME, don't throw Exception all over the place.
-
-public class RemoteListenerManager
-{
-  public static String sep = System.getProperty("line.separator");
-
-  private static final String DEFAULT_HOST = "localhost",
-    DEFAULT_BINDNAME = TchConstants.DEFAULT_REMOTE_LISTENER_BINDNAME;
-  private static final int DEFAULT_PORT = TchConstants.DEFAULT_RMI_REG_PORT;
-
-  private String host = null;
-  private String bindname = null;
-  private int port = -1;
-  private RemoteExecTaskRunner runner = null;
-
-  public RemoteListenerManager()
-  {
-    this(DEFAULT_PORT);
-  }
-
-  public RemoteListenerManager(int inPort)
-  {
-    this(DEFAULT_HOST, inPort);
-  }
-
-  public RemoteListenerManager(String inHost, int inPort)
-  {
-    this(inHost, inPort, DEFAULT_BINDNAME);
-  }
-
-  public RemoteListenerManager(String inHost, int inPort, String inBindname)
-  {
-    host = inHost;
-    port = inPort;
-    bindname = inBindname;
-  }
-
-  public synchronized RemoteExecTaskRunner getRemoteExecTaskRunner()
-    throws Exception
-  {
-    if (runner == null)
-      lookup();
-    return runner;
-  }
-
-  public Collection getProcessSummaries() throws Exception
-  {
-    return getRemoteExecTaskRunner().getProcessSummaries();
-  }
-
-  public void shutdown() throws Exception
-  {
-    try
-    {
-      getRemoteExecTaskRunner().shutdown();
-    }
-    catch (java.rmi.UnmarshalException ex)
-    {
-      // swallow
-    }
-    runner = null;
-  }
-
-  public void sendCmd(String inCmd) throws Exception
-  {
-    ExecTask exec = new ExecTask("cmd", inCmd, false);
-    exec.setVerbose(false);
-    exec.setWriteCmdToFile(false);
-    getRemoteExecTaskRunner().runExecTask(exec);
-  }
-
-  private void lookup() throws Exception
-  {
-    String url = "rmi://" + host + ":" + port + "/" + bindname;
-
-    System.out.println(
-      "RemoteListenerProcessManager." + "lookupRemote, url is: " + url);
-    runner = (RemoteExecTaskRunner)Naming.lookup(url);
-  }
-
-  public static void main(String[] args) throws Exception
-  {
-    System.out.println("");
-
-    String host = GeneralUtil.getValueFor(args, "-host", DEFAULT_HOST);
-    String port =
-      GeneralUtil.getValueFor(args, "-port", String.valueOf(DEFAULT_PORT));
-    String bindname =
-      GeneralUtil.getValueFor(args, "-bindname", DEFAULT_BINDNAME);
-
-    RemoteListenerManager manager =
-      new RemoteListenerManager(host, Integer.parseInt(port), bindname);
-
-    if (GeneralUtil.isSet(args, "-info"))
-    {
-      TchUtils.log("Getting info for processes...");
-      System.out.println(getInfoForAllProcesses(manager));
-    }
-    else
-      if (GeneralUtil.isSet(args, "-interactive"))
-      {
-        runInteractiveMode(manager);
-        return;
-      }
-      else
-        if (GeneralUtil.isSet(args, "-sendcmd"))
-        {
-          String cmd = GeneralUtil.getValueFor(args, "-sendcmd", "");
-          TchUtils.log("Will send cmdline: " + cmd);
-          manager.sendCmd(cmd);
-        }
-        else
-        {
-          TchUtils.log(
-            "Current default behavior is to lookup listener and "
-              + "to shut it down...");
-          TchUtils.log("Will destroy these processes...");
-          System.out.println(getInfoForAliveProcesses(manager));
-          System.out.println("listener process");
-          manager.shutdown();
-        }
-
-    System.out.println(sep);
-    TchUtils.log("...done" + sep);
-  }
-
-  private static String getInfoForAliveProcesses(RemoteListenerManager manager)
-    throws Exception
-  {
-    return getInfoForAllProcesses(manager, true);
-  }
-
-  private static String getInfoForAllProcesses(RemoteListenerManager manager)
-    throws Exception
-  {
-    return getInfoForAllProcesses(manager, false);
-  }
-
-  private static String getInfoForAllProcesses(
-    RemoteListenerManager manager,
-    boolean careOnlyAboutLivingOnes)
-    throws Exception
-  {
-    StringBuffer info = new StringBuffer();
-    for (Iterator iter = manager.getProcessSummaries().iterator();
-      iter.hasNext();
-      )
-    {
-      ProcessSummary ps = (ProcessSummary)iter.next();
-      // either we want the info, no matter if alive or not,
-      // or we only want if if it is alive
-      if (!careOnlyAboutLivingOnes
-        || (ps.getProcessTerminated() != null
-          && !ps.getProcessTerminated().booleanValue()))
-        info.append(sep + ps.toString() + sep);
-    }
-    return info.toString();
-  }
-
-  private static void runInteractiveMode(RemoteListenerManager manager)
-  {
-    TchUtils.log("Entering interactive mode");
-    TchUtils.log("Enter 'exit' to quit");
-//    CmdReader cmdInterpreter =
-//      new CmdReader(
-//        new BufferedReader(new InputStreamReader(System.in)),
-//        new BufferedWriter(new OutputStreamWriter(System.out)));
-//    //cmdInterpreter.addCommandAction(new InteractiveCommandHandler(manager));
-//    try
-//    {
-//      cmdInterpreter.start();
-//    }
-//    catch (IOException io)
-//    {
-//      io.printStackTrace();
-//    }
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.process.listener;
+
+import java.rmi.Naming;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.apache.beehive.test.tools.tch.core.remote.ExecTask;
+import org.apache.beehive.test.tools.tch.core.remote.ProcessSummary;
+import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunner;
+import org.apache.beehive.test.tools.tch.util.TchConstants;
+import org.apache.beehive.test.tools.tch.util.TchUtils;
+import org.apache.beehive.test.tools.tch.util.GeneralUtil;
+
+// stand-alone utility to manage listener, get information about processes
+// it started, and shut everything down.
+
+// FIXME, don't throw Exception all over the place.
+
+public class RemoteListenerManager
+{
+  public static String sep = System.getProperty("line.separator");
+
+  private static final String DEFAULT_HOST = "localhost",
+    DEFAULT_BINDNAME = TchConstants.DEFAULT_REMOTE_LISTENER_BINDNAME;
+  private static final int DEFAULT_PORT = TchConstants.DEFAULT_RMI_REG_PORT;
+
+  private String host = null;
+  private String bindname = null;
+  private int port = -1;
+  private RemoteExecTaskRunner runner = null;
+
+  public RemoteListenerManager()
+  {
+    this(DEFAULT_PORT);
+  }
+
+  public RemoteListenerManager(int inPort)
+  {
+    this(DEFAULT_HOST, inPort);
+  }
+
+  public RemoteListenerManager(String inHost, int inPort)
+  {
+    this(inHost, inPort, DEFAULT_BINDNAME);
+  }
+
+  public RemoteListenerManager(String inHost, int inPort, String inBindname)
+  {
+    host = inHost;
+    port = inPort;
+    bindname = inBindname;
+  }
+
+  public synchronized RemoteExecTaskRunner getRemoteExecTaskRunner()
+    throws Exception
+  {
+    if (runner == null)
+      lookup();
+    return runner;
+  }
+
+  public Collection getProcessSummaries() throws Exception
+  {
+    return getRemoteExecTaskRunner().getProcessSummaries();
+  }
+
+  public void shutdown() throws Exception
+  {
+    try
+    {
+      getRemoteExecTaskRunner().shutdown();
+    }
+    catch (java.rmi.UnmarshalException ex)
+    {
+      // swallow
+    }
+    runner = null;
+  }
+
+  public void sendCmd(String inCmd) throws Exception
+  {
+    ExecTask exec = new ExecTask("cmd", inCmd, false);
+    exec.setVerbose(false);
+    exec.setWriteCmdToFile(false);
+    getRemoteExecTaskRunner().runExecTask(exec);
+  }
+
+  private void lookup() throws Exception
+  {
+    String url = "rmi://" + host + ":" + port + "/" + bindname;
+
+    System.out.println(
+      "RemoteListenerProcessManager." + "lookupRemote, url is: " + url);
+    runner = (RemoteExecTaskRunner)Naming.lookup(url);
+  }
+
+  public static void main(String[] args) throws Exception
+  {
+    System.out.println("");
+
+    String host = GeneralUtil.getValueFor(args, "-host", DEFAULT_HOST);
+    String port =
+      GeneralUtil.getValueFor(args, "-port", String.valueOf(DEFAULT_PORT));
+    String bindname =
+      GeneralUtil.getValueFor(args, "-bindname", DEFAULT_BINDNAME);
+
+    RemoteListenerManager manager =
+      new RemoteListenerManager(host, Integer.parseInt(port), bindname);
+
+    if (GeneralUtil.isSet(args, "-info"))
+    {
+      TchUtils.log("Getting info for processes...");
+      System.out.println(getInfoForAllProcesses(manager));
+    }
+    else
+      if (GeneralUtil.isSet(args, "-interactive"))
+      {
+        runInteractiveMode(manager);
+        return;
+      }
+      else
+        if (GeneralUtil.isSet(args, "-sendcmd"))
+        {
+          String cmd = GeneralUtil.getValueFor(args, "-sendcmd", "");
+          TchUtils.log("Will send cmdline: " + cmd);
+          manager.sendCmd(cmd);
+        }
+        else
+        {
+          TchUtils.log(
+            "Current default behavior is to lookup listener and "
+              + "to shut it down...");
+          TchUtils.log("Will destroy these processes...");
+          System.out.println(getInfoForAliveProcesses(manager));
+          System.out.println("listener process");
+          manager.shutdown();
+        }
+
+    System.out.println(sep);
+    TchUtils.log("...done" + sep);
+  }
+
+  private static String getInfoForAliveProcesses(RemoteListenerManager manager)
+    throws Exception
+  {
+    return getInfoForAllProcesses(manager, true);
+  }
+
+  private static String getInfoForAllProcesses(RemoteListenerManager manager)
+    throws Exception
+  {
+    return getInfoForAllProcesses(manager, false);
+  }
+
+  private static String getInfoForAllProcesses(
+    RemoteListenerManager manager,
+    boolean careOnlyAboutLivingOnes)
+    throws Exception
+  {
+    StringBuffer info = new StringBuffer();
+    for (Iterator iter = manager.getProcessSummaries().iterator();
+      iter.hasNext();
+      )
+    {
+      ProcessSummary ps = (ProcessSummary)iter.next();
+      // either we want the info, no matter if alive or not,
+      // or we only want if if it is alive
+      if (!careOnlyAboutLivingOnes
+        || (ps.getProcessTerminated() != null
+          && !ps.getProcessTerminated().booleanValue()))
+        info.append(sep + ps.toString() + sep);
+    }
+    return info.toString();
+  }
+
+  private static void runInteractiveMode(RemoteListenerManager manager)
+  {
+    TchUtils.log("Entering interactive mode");
+    TchUtils.log("Enter 'exit' to quit");
+//    CmdReader cmdInterpreter =
+//      new CmdReader(
+//        new BufferedReader(new InputStreamReader(System.in)),
+//        new BufferedWriter(new OutputStreamWriter(System.out)));
+//    //cmdInterpreter.addCommandAction(new InteractiveCommandHandler(manager));
+//    try
+//    {
+//      cmdInterpreter.start();
+//    }
+//    catch (IOException io)
+//    {
+//      io.printStackTrace();
+//    }
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerMinimalConfigurationInfo.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerMinimalConfigurationInfo.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerMinimalConfigurationInfo.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerMinimalConfigurationInfo.java Fri Aug 12 08:12:28 2005
@@ -1,230 +1,230 @@
-package org.apache.beehive.test.tools.tch.extension.process.listener;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.tools.ant.BuildException;
-
-import org.apache.beehive.test.tools.tch.core.configuration.MinimalConfigurationInfo;
-import org.apache.beehive.test.tools.tch.core.configuration.ProcessManagementConfigurationRuntimeException;
-import org.apache.beehive.test.tools.tch.core.process.ProcessOverride;
-import org.apache.beehive.test.tools.tch.util.TchConstants;
-import org.apache.beehive.test.tools.tch.util.TchUtils;
-import org.apache.beehive.test.tools.tch.util.ServicePortUtil;
-import org.apache.beehive.test.tools.tch.util.time.Time;
-
-public class RemoteListenerMinimalConfigurationInfo
-  implements MinimalConfigurationInfo
-{
-  private String home = ".";
-  private String javaopts = "";
-  private String bindName = TchConstants.DEFAULT_REMOTE_LISTENER_BINDNAME;
-  private Integer port = null;
-  private Time startupTimeout = DEFAULT_STARTUP_TIMEOUT;
-  private transient ServicePortUtil servicePortUtil = ServicePortUtil.getInstance();
-  
-  private Map minusDprops = new HashMap();
-  private Map localMinusDprops = new HashMap();
-  private Collection flags = new ArrayList();
-
-  protected static final Time DEFAULT_STARTUP_TIMEOUT = 
-    new Time(10, Time.SECONDS);
-
-  public String getHome()
-  {
-    return home;
-  }
-
-  public void setHome(String in)
-  {
-    home = in;
-  }
-
-  public String getBindName()
-  {
-    return bindName;
-  }
-
-  public void setBindName(String in)
-  {
-    bindName = in;
-  }
-
-  public synchronized int getPort(String host)
-  {
-    System.err.println("*** getPort: " + port);
-    if (port == null)
-    {
-      try
-      {
-        port =
-          servicePortUtil.getUnusedPort(
-            new Integer(TchUtils.DEFAULT_RMI_REG_PORT),
-            host);
-      }
-      catch (IOException e)
-      {
-        throw new ProcessManagementConfigurationRuntimeException(e, "Port lookup failed");
-      }
-    }
-    
-    return port.intValue();
-  }
-
-  public void setPort(int in)
-  {
-    // Port 0 is wildcard i.e. allocate when used 
-    if (in != 0)
-    {
-      port = new Integer(in);
-    }
-  }
-
-  public String getJavaopts()
-  {
-    return javaopts;
-  }
-
-  public void setJavaopts(String in)
-  {
-    javaopts = in;
-  }
-  
-  public Map getMinusDProperties()
-  {
-    return minusDprops;
-  }
-
-  public void setMinusDProperties(Map in)
-  {
-    minusDprops = in;
-  }
-  
-  public Map getLocalMinusDProperties()
-  {
-    return localMinusDprops;
-  }
-
-  public void setLocalMinusDProperties(Map in)
-  {
-    localMinusDprops = in;
-  }
-  
-  public void clearLocalMinusDProperties()
-  {
-    localMinusDprops.clear();
-  }
-
-  public void addLocalMinusDProperty(String propName, String propVal)
-  {
-    localMinusDprops.put(propName, propVal);
-  }
-    
-  // Note that the Collection is not necessarily split up in a logical way here.
-  // A single item in the Collection can contain a string containing multiple actual flags
-  public Collection getFlags()
-  {
-    return Collections.unmodifiableCollection(flags);
-  }
-
-  public void setFlagsAsString(String in)
-  {
-    if (in == null)
-      return;
-    flags = new ArrayList();
-    //  for now, just split by spaces. revisit this 
-    //TchUtils.parseStringToStrings(in, " ", flags);
-    flags.add(in);
-  }
-
-  // Return flags, but remove any system properties which have been
-  // locally overridden using the process-override feature
-  protected String getFlagsAsString()
-  {
-    StringBuffer sb = new StringBuffer();
-    for (Iterator iter = flags.iterator(); iter.hasNext();)
-    {
-      String oneflag = (String)iter.next();
-      // replace all instances of any locally overridden property settings in the
-      // flags with an empty string. We will end up adding locally overridden properties
-      // back in later
-      for (Iterator propiter = getLocalMinusDProperties().keySet().iterator();
-        propiter.hasNext();
-        )
-      {
-        String propname = (String)propiter.next();
-        oneflag =
-          TchUtils.replaceNameValuePair(oneflag, "-D" + propname, "");
-      }
-      sb.append(oneflag);
-      if (iter.hasNext())
-        sb.append(" ");
-    }
-    return sb.toString();
-  }
-
-  public void setFlags(Collection in)
-  {
-    flags = in;
-  }
-  
-  /**
-    * Check whether the specifid system property has already been set.
-    * This will check the minusdproperties as well as properties
-    * passed in via flags
-    */
-  public boolean isSysPropSet(String propName)
-  {
-    Map curmap = getMinusDProperties();
-    if (curmap.containsKey(propName))
-    {
-      return true;
-    }
-    else
-    {
-      Collection curflags = this.getFlags();
-      for (Iterator iter = curflags.iterator(); iter.hasNext();)
-      {
-        String flag = (String)iter.next();
-        // check the start of the flag
-        if (flag.startsWith("-D" + propName + "="))
-        {
-          return true;
-        }
-        // check within the flag string as well
-        else if (flag.indexOf(" -D" + propName + "=") >= 0)
-        {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  public Time getStartupTimeout()
-  {
-    return startupTimeout;
-  }
-
-  public void setStartupTimeout(Time in)
-  {
-    startupTimeout = in;
-  }
-  
-  public Object cloneWithOverride(ProcessOverride processOverride)
-  {
-    throw new BuildException("cloneWithOverride unsupported in RemoteListenerMinimalConfigurationInfo");
-  }
-
-  public Object cloneWithOverride(
-    ProcessOverride processOverride,
-    Map overrideHandlerMap)
-  {
-    throw new BuildException("cloneWithOverride unsupported in RemoteListenerMinimalConfigurationInfo");
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.process.listener;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.apache.tools.ant.BuildException;
+
+import org.apache.beehive.test.tools.tch.core.configuration.MinimalConfigurationInfo;
+import org.apache.beehive.test.tools.tch.core.configuration.ProcessManagementConfigurationRuntimeException;
+import org.apache.beehive.test.tools.tch.core.process.ProcessOverride;
+import org.apache.beehive.test.tools.tch.util.TchConstants;
+import org.apache.beehive.test.tools.tch.util.TchUtils;
+import org.apache.beehive.test.tools.tch.util.ServicePortUtil;
+import org.apache.beehive.test.tools.tch.util.time.Time;
+
+public class RemoteListenerMinimalConfigurationInfo
+  implements MinimalConfigurationInfo
+{
+  private String home = ".";
+  private String javaopts = "";
+  private String bindName = TchConstants.DEFAULT_REMOTE_LISTENER_BINDNAME;
+  private Integer port = null;
+  private Time startupTimeout = DEFAULT_STARTUP_TIMEOUT;
+  private transient ServicePortUtil servicePortUtil = ServicePortUtil.getInstance();
+  
+  private Map minusDprops = new HashMap();
+  private Map localMinusDprops = new HashMap();
+  private Collection flags = new ArrayList();
+
+  protected static final Time DEFAULT_STARTUP_TIMEOUT = 
+    new Time(10, Time.SECONDS);
+
+  public String getHome()
+  {
+    return home;
+  }
+
+  public void setHome(String in)
+  {
+    home = in;
+  }
+
+  public String getBindName()
+  {
+    return bindName;
+  }
+
+  public void setBindName(String in)
+  {
+    bindName = in;
+  }
+
+  public synchronized int getPort(String host)
+  {
+    System.err.println("*** getPort: " + port);
+    if (port == null)
+    {
+      try
+      {
+        port =
+          servicePortUtil.getUnusedPort(
+            new Integer(TchUtils.DEFAULT_RMI_REG_PORT),
+            host);
+      }
+      catch (IOException e)
+      {
+        throw new ProcessManagementConfigurationRuntimeException(e, "Port lookup failed");
+      }
+    }
+    
+    return port.intValue();
+  }
+
+  public void setPort(int in)
+  {
+    // Port 0 is wildcard i.e. allocate when used 
+    if (in != 0)
+    {
+      port = new Integer(in);
+    }
+  }
+
+  public String getJavaopts()
+  {
+    return javaopts;
+  }
+
+  public void setJavaopts(String in)
+  {
+    javaopts = in;
+  }
+  
+  public Map getMinusDProperties()
+  {
+    return minusDprops;
+  }
+
+  public void setMinusDProperties(Map in)
+  {
+    minusDprops = in;
+  }
+  
+  public Map getLocalMinusDProperties()
+  {
+    return localMinusDprops;
+  }
+
+  public void setLocalMinusDProperties(Map in)
+  {
+    localMinusDprops = in;
+  }
+  
+  public void clearLocalMinusDProperties()
+  {
+    localMinusDprops.clear();
+  }
+
+  public void addLocalMinusDProperty(String propName, String propVal)
+  {
+    localMinusDprops.put(propName, propVal);
+  }
+    
+  // Note that the Collection is not necessarily split up in a logical way here.
+  // A single item in the Collection can contain a string containing multiple actual flags
+  public Collection getFlags()
+  {
+    return Collections.unmodifiableCollection(flags);
+  }
+
+  public void setFlagsAsString(String in)
+  {
+    if (in == null)
+      return;
+    flags = new ArrayList();
+    //  for now, just split by spaces. revisit this 
+    //TchUtils.parseStringToStrings(in, " ", flags);
+    flags.add(in);
+  }
+
+  // Return flags, but remove any system properties which have been
+  // locally overridden using the process-override feature
+  protected String getFlagsAsString()
+  {
+    StringBuffer sb = new StringBuffer();
+    for (Iterator iter = flags.iterator(); iter.hasNext();)
+    {
+      String oneflag = (String)iter.next();
+      // replace all instances of any locally overridden property settings in the
+      // flags with an empty string. We will end up adding locally overridden properties
+      // back in later
+      for (Iterator propiter = getLocalMinusDProperties().keySet().iterator();
+        propiter.hasNext();
+        )
+      {
+        String propname = (String)propiter.next();
+        oneflag =
+          TchUtils.replaceNameValuePair(oneflag, "-D" + propname, "");
+      }
+      sb.append(oneflag);
+      if (iter.hasNext())
+        sb.append(" ");
+    }
+    return sb.toString();
+  }
+
+  public void setFlags(Collection in)
+  {
+    flags = in;
+  }
+  
+  /**
+    * Check whether the specifid system property has already been set.
+    * This will check the minusdproperties as well as properties
+    * passed in via flags
+    */
+  public boolean isSysPropSet(String propName)
+  {
+    Map curmap = getMinusDProperties();
+    if (curmap.containsKey(propName))
+    {
+      return true;
+    }
+    else
+    {
+      Collection curflags = this.getFlags();
+      for (Iterator iter = curflags.iterator(); iter.hasNext();)
+      {
+        String flag = (String)iter.next();
+        // check the start of the flag
+        if (flag.startsWith("-D" + propName + "="))
+        {
+          return true;
+        }
+        // check within the flag string as well
+        else if (flag.indexOf(" -D" + propName + "=") >= 0)
+        {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
+  public Time getStartupTimeout()
+  {
+    return startupTimeout;
+  }
+
+  public void setStartupTimeout(Time in)
+  {
+    startupTimeout = in;
+  }
+  
+  public Object cloneWithOverride(ProcessOverride processOverride)
+  {
+    throw new BuildException("cloneWithOverride unsupported in RemoteListenerMinimalConfigurationInfo");
+  }
+
+  public Object cloneWithOverride(
+    ProcessOverride processOverride,
+    Map overrideHandlerMap)
+  {
+    throw new BuildException("cloneWithOverride unsupported in RemoteListenerMinimalConfigurationInfo");
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerMinimalConfigurationInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessHandler.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessHandler.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessHandler.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessHandler.java Fri Aug 12 08:12:28 2005
@@ -1,35 +1,35 @@
-package org.apache.beehive.test.tools.tch.extension.process.listener;
-
-import org.apache.beehive.test.tools.tch.core.process.ProcessHandler;
-import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunner;
-
-public interface RemoteListenerProcessHandler
-  extends ProcessHandler
-{
-  /**
-   * Lookup the RemoteExecTaskRunner, usually to pass it a task to run.
-   * 
-   * @return A reference to the RemoteExecTaskRunner.
-   */
-  public RemoteExecTaskRunner lookup();
-  
-  /**
-   * Checks if this agent is up or not.
-   * 
-   * @return true if alive, false otherwise.
-   */
-  public boolean isAlive();
-  
-  
-  /**
-   * Returns the javaopts set (in the process-config file) on this agent VM.
-   * 
-   * @return String
-   */
-  public String getJavaopts();
-  
-}
-
-
-
-
+package org.apache.beehive.test.tools.tch.extension.process.listener;
+
+import org.apache.beehive.test.tools.tch.core.process.ProcessHandler;
+import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunner;
+
+public interface RemoteListenerProcessHandler
+  extends ProcessHandler
+{
+  /**
+   * Lookup the RemoteExecTaskRunner, usually to pass it a task to run.
+   * 
+   * @return A reference to the RemoteExecTaskRunner.
+   */
+  public RemoteExecTaskRunner lookup();
+  
+  /**
+   * Checks if this agent is up or not.
+   * 
+   * @return true if alive, false otherwise.
+   */
+  public boolean isAlive();
+  
+  
+  /**
+   * Returns the javaopts set (in the process-config file) on this agent VM.
+   * 
+   * @return String
+   */
+  public String getJavaopts();
+  
+}
+
+
+
+

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessManager.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessManager.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessManager.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessManager.java Fri Aug 12 08:12:28 2005
@@ -1,292 +1,292 @@
-package org.apache.beehive.test.tools.tch.extension.process.listener;
-
-import java.io.File;
-import java.io.IOException;
-import java.rmi.Naming;
-import java.rmi.RemoteException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Iterator;
-import java.util.Map.Entry;
-
-import org.apache.beehive.test.tools.tch.core.os.OS;
-import org.apache.beehive.test.tools.tch.core.os.OSSingleton;
-import org.apache.beehive.test.tools.tch.core.process.Env;
-import org.apache.beehive.test.tools.tch.core.process.Machine;
-import org.apache.beehive.test.tools.tch.core.process.Process;
-import org.apache.beehive.test.tools.tch.core.process.ProcessManagementRuntimeException;
-import org.apache.beehive.test.tools.tch.core.process.ProcessTimeoutException;
-import org.apache.beehive.test.tools.tch.core.remote.ExecTask;
-import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunner;
-import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunnerImpl;
-import org.apache.beehive.test.tools.tch.task.TaskException;
-import org.apache.beehive.test.tools.tch.util.time.Time;
-
-public class RemoteListenerProcessManager
-  extends AbstractListenerProcessManager
-{
-  public static final String REMOTE_LISTENER_MAIN_CLASS =
-    "org.apache.beehive.test.tools.tch.extension.process.listener.RemoteListener";
-
-  public static final Time ENSURE_REST = new Time(4, Time.SECONDS);
-
-  private transient Map remoteExecListeners = null;
-  // process name --> RemoteExecTaskRunner
-
-  public void startup(Process inProcess)
-  {
-    if (isAlive(inProcess))
-      return;
-
-    System.out.println(
-      "remote tch agent starting on host: "
-        + inProcess.getMachine().getExternalHostName());
-
-    if (inProcess.getMachine().isLocal())
-    {
-      // Why exec on local box although this is the remote listener
-      // process manager?
-      // Because we have to set an environment, and we can only do that
-      // by forking a new process.
-      execOnLocalBox(inProcess);
-    }
-    else
-      //execOnRemoteBox(inProcess);
-
-    try
-    {
-      waitAlive(inProcess);
-    }
-    catch (ProcessTimeoutException ex)
-    {
-      throw new ProcessManagementRuntimeException(ex.getMessage());
-    }
-  }
-
-  public boolean isAlive(Process inProcess)
-  {
-    boolean connected = false;
-    // if we cannot look it up, then assume it is not up
-    try
-    {
-      doLookup(inProcess);
-      connected = true;
-    }
-    catch (Exception e)
-    {
-      connected = false;
-    }
-    if (!connected)
-      resetRemoteExecListener(inProcess);
-    return connected;
-  }
-
-  public void shutdown(Process inProcess)
-  {
-    if (!isAlive(inProcess))
-      return;
-
-    try
-    {
-      RemoteExecTaskRunner listener = lookup(inProcess);
-      listener.shutdown();
-    }
-    catch (java.rmi.UnmarshalException ex)
-    {
-      // swallow - this is thrown when shutting down
-    }
-    catch (RemoteException ex)
-    {
-      throw new ProcessManagementRuntimeException(ex);
-    }
-    finally
-    {
-      resetRemoteExecListener(inProcess);
-    }
-  }
-
-  private RemoteExecTaskRunner doLookup(Process inProcess)
-    throws RemoteException
-  {
-    RemoteExecTaskRunner remoteExecTaskRunner = null;
-
-    String hostName = getHost(inProcess);
-    String bindName = getConfiguration(inProcess).getBindName();
-    try
-    {
-      int port = getPort(inProcess);
-      String url = "rmi://" + hostName + ":" + port + "/" + bindName;
-
-      remoteExecTaskRunner = (RemoteExecTaskRunner)Naming.lookup(url);
-    }
-    catch (Throwable th)
-    {
-      throw new RemoteException("Failed to lookup remote task runner", th);
-    }
-    return remoteExecTaskRunner;
-  }
-
-  private void waitAlive(Process inProcess) throws ProcessTimeoutException
-  {
-    Time startupTimeout = getStartupTimeout(inProcess);
-    Time stopTime = Time.getFuture(startupTimeout);
-    while (!isAlive(inProcess))
-    {
-      ENSURE_REST.sleepFor();
-      if (stopTime.isPast())
-      {
-        throw new ProcessTimeoutException(
-          inProcess.getName()
-            + " failed to become alive "
-            + "within "
-            + startupTimeout);
-      }
-    }
-  }
-
-  private String getBindName(Process inProcess)
-  {
-    return getConfiguration(inProcess).getBindName();
-  }
-
-  private String getHost(Process inProcess)
-  {
-    Machine machine = inProcess.getMachine();
-    String hostName = machine.getExternalHostName();
-    if (machine.isLocalhost())
-    {
-      // workaround, since rmi reg starts on machine-name, not localhost
-      // FIXME, use socket factory to specify which host rmi reg should start on
-
-      hostName = machine.getMachineName();
-    }
-    return hostName;
-  }
-
-  public int getPort(Process inProcess)
-  {
-    return getConfiguration(inProcess).getPort(getHost(inProcess));
-  }
-
-  public RemoteExecTaskRunner lookup(Process inProcess) throws RemoteException
-  {
-    synchronized (inProcess)
-    {
-      RemoteExecTaskRunner runner = null;
-
-      if (remoteExecListeners == null)
-      {
-        remoteExecListeners = new HashMap();
-      }
-      else
-      {
-        runner =
-          (RemoteExecTaskRunner)remoteExecListeners.get(inProcess.getName());
-      }
-
-      if (runner == null)
-      {
-        runner = doLookup(inProcess);
-        remoteExecListeners.put(inProcess.getName(), runner);
-      }
-      return runner;
-    }
-  }
-
-  private void resetRemoteExecListener(Process inProcess)
-  {
-    synchronized (inProcess)
-    {
-      if (remoteExecListeners == null)
-        remoteExecListeners = new HashMap();
-      else
-        remoteExecListeners.remove(inProcess.getName());
-    }
-  }
-
-  public final String getJavaCommand(Process inProcess)
-  {
-    return super.getJavaCommand(inProcess) + " " + getJavaopts(inProcess);
-  }
-
-  private String getCmdline(Process inProcess)
-  {
-    String cmdline =
-      buildCmdLine(inProcess)
-      + " -port "
-      + getPort(inProcess)
-      + " -bindname "
-      + getBindName(inProcess);
-    System.out.println("Starting Listener with Command : " + cmdline);
-    return cmdline;
-  }
-  
-  private String buildCmdLine(Process inProcess)
-  {
-    String cmd = getJavaCommand(inProcess) + " ";
-    for (Iterator iterator = getMinusDProperties(inProcess).entrySet().iterator();
-      iterator.hasNext();
-      )
-    {
-      Map.Entry me = (Map.Entry)iterator.next();
-      cmd += "-D" + me.getKey() + "=" + me.getValue() + " ";
-    }
-    cmd += REMOTE_LISTENER_MAIN_CLASS;
-    return cmd;
-  }
-  
-  public Map getMinusDProperties(Process inProcess)
-  {
-    Map props = new HashMap(getConfiguration(inProcess).getMinusDProperties());
-    // localProps contain system properties set in a test class using ph.setSysProp()
-    Map localProps = new HashMap(getConfiguration(inProcess).getLocalMinusDProperties());
-    props.putAll(localProps);
-    return props;
-  }
-  
-  public void setSysProp(Process inProcess, String prop, String val)
-  {
-    if (getConfiguration(inProcess).isSysPropSet(prop))
-    {
-      getConfiguration(inProcess).addLocalMinusDProperty(prop, val);
-    }
-    else
-    {
-      throw new ProcessManagementRuntimeException(
-        "The system property "
-          + prop
-          + " cannot be overridden since a base value was not assigned."
-          + " Only properties which already have a base value may be overridden.");
-    }
-  }
- 
-  // instead of writing this method, look into 
-  // extending from the exec-process-manager - should have all we need.
-  private void execOnLocalBox(Process inProcess)
-  {
-    File home = inProcess.getAbsoluteHome();
-    System.out.println(
-      "remote tch agent in directory: " + home.getAbsolutePath());
-    try
-    {
-      ExecTask execTask =
-        new ExecTask(
-          inProcess.getName() + inProcess.getCmdFileModifier(),
-          getCmdline(inProcess),
-          home.getAbsolutePath(),
-          inProcess.startInOwnWindow());
-      // should we also honor tch.process.log.basedir for the listener?
-      // should we also honor tch.process.merge-output-streams for the listener?
-      new RemoteExecTaskRunnerImpl().runExecTask(execTask);
-    }
-    catch (RemoteException ex)
-    {
-      throw new ProcessManagementRuntimeException(ex);
-    }
-    catch (TaskException ex)
-    {
-      throw new ProcessManagementRuntimeException(ex);
-    }
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.process.listener;
+
+import java.io.File;
+import java.io.IOException;
+import java.rmi.Naming;
+import java.rmi.RemoteException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import org.apache.beehive.test.tools.tch.core.os.OS;
+import org.apache.beehive.test.tools.tch.core.os.OSSingleton;
+import org.apache.beehive.test.tools.tch.core.process.Env;
+import org.apache.beehive.test.tools.tch.core.process.Machine;
+import org.apache.beehive.test.tools.tch.core.process.Process;
+import org.apache.beehive.test.tools.tch.core.process.ProcessManagementRuntimeException;
+import org.apache.beehive.test.tools.tch.core.process.ProcessTimeoutException;
+import org.apache.beehive.test.tools.tch.core.remote.ExecTask;
+import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunner;
+import org.apache.beehive.test.tools.tch.core.remote.RemoteExecTaskRunnerImpl;
+import org.apache.beehive.test.tools.tch.task.TaskException;
+import org.apache.beehive.test.tools.tch.util.time.Time;
+
+public class RemoteListenerProcessManager
+  extends AbstractListenerProcessManager
+{
+  public static final String REMOTE_LISTENER_MAIN_CLASS =
+    "org.apache.beehive.test.tools.tch.extension.process.listener.RemoteListener";
+
+  public static final Time ENSURE_REST = new Time(4, Time.SECONDS);
+
+  private transient Map remoteExecListeners = null;
+  // process name --> RemoteExecTaskRunner
+
+  public void startup(Process inProcess)
+  {
+    if (isAlive(inProcess))
+      return;
+
+    System.out.println(
+      "remote tch agent starting on host: "
+        + inProcess.getMachine().getExternalHostName());
+
+    if (inProcess.getMachine().isLocal())
+    {
+      // Why exec on local box although this is the remote listener
+      // process manager?
+      // Because we have to set an environment, and we can only do that
+      // by forking a new process.
+      execOnLocalBox(inProcess);
+    }
+    else
+      //execOnRemoteBox(inProcess);
+
+    try
+    {
+      waitAlive(inProcess);
+    }
+    catch (ProcessTimeoutException ex)
+    {
+      throw new ProcessManagementRuntimeException(ex.getMessage());
+    }
+  }
+
+  public boolean isAlive(Process inProcess)
+  {
+    boolean connected = false;
+    // if we cannot look it up, then assume it is not up
+    try
+    {
+      doLookup(inProcess);
+      connected = true;
+    }
+    catch (Exception e)
+    {
+      connected = false;
+    }
+    if (!connected)
+      resetRemoteExecListener(inProcess);
+    return connected;
+  }
+
+  public void shutdown(Process inProcess)
+  {
+    if (!isAlive(inProcess))
+      return;
+
+    try
+    {
+      RemoteExecTaskRunner listener = lookup(inProcess);
+      listener.shutdown();
+    }
+    catch (java.rmi.UnmarshalException ex)
+    {
+      // swallow - this is thrown when shutting down
+    }
+    catch (RemoteException ex)
+    {
+      throw new ProcessManagementRuntimeException(ex);
+    }
+    finally
+    {
+      resetRemoteExecListener(inProcess);
+    }
+  }
+
+  private RemoteExecTaskRunner doLookup(Process inProcess)
+    throws RemoteException
+  {
+    RemoteExecTaskRunner remoteExecTaskRunner = null;
+
+    String hostName = getHost(inProcess);
+    String bindName = getConfiguration(inProcess).getBindName();
+    try
+    {
+      int port = getPort(inProcess);
+      String url = "rmi://" + hostName + ":" + port + "/" + bindName;
+
+      remoteExecTaskRunner = (RemoteExecTaskRunner)Naming.lookup(url);
+    }
+    catch (Throwable th)
+    {
+      throw new RemoteException("Failed to lookup remote task runner", th);
+    }
+    return remoteExecTaskRunner;
+  }
+
+  private void waitAlive(Process inProcess) throws ProcessTimeoutException
+  {
+    Time startupTimeout = getStartupTimeout(inProcess);
+    Time stopTime = Time.getFuture(startupTimeout);
+    while (!isAlive(inProcess))
+    {
+      ENSURE_REST.sleepFor();
+      if (stopTime.isPast())
+      {
+        throw new ProcessTimeoutException(
+          inProcess.getName()
+            + " failed to become alive "
+            + "within "
+            + startupTimeout);
+      }
+    }
+  }
+
+  private String getBindName(Process inProcess)
+  {
+    return getConfiguration(inProcess).getBindName();
+  }
+
+  private String getHost(Process inProcess)
+  {
+    Machine machine = inProcess.getMachine();
+    String hostName = machine.getExternalHostName();
+    if (machine.isLocalhost())
+    {
+      // workaround, since rmi reg starts on machine-name, not localhost
+      // FIXME, use socket factory to specify which host rmi reg should start on
+
+      hostName = machine.getMachineName();
+    }
+    return hostName;
+  }
+
+  public int getPort(Process inProcess)
+  {
+    return getConfiguration(inProcess).getPort(getHost(inProcess));
+  }
+
+  public RemoteExecTaskRunner lookup(Process inProcess) throws RemoteException
+  {
+    synchronized (inProcess)
+    {
+      RemoteExecTaskRunner runner = null;
+
+      if (remoteExecListeners == null)
+      {
+        remoteExecListeners = new HashMap();
+      }
+      else
+      {
+        runner =
+          (RemoteExecTaskRunner)remoteExecListeners.get(inProcess.getName());
+      }
+
+      if (runner == null)
+      {
+        runner = doLookup(inProcess);
+        remoteExecListeners.put(inProcess.getName(), runner);
+      }
+      return runner;
+    }
+  }
+
+  private void resetRemoteExecListener(Process inProcess)
+  {
+    synchronized (inProcess)
+    {
+      if (remoteExecListeners == null)
+        remoteExecListeners = new HashMap();
+      else
+        remoteExecListeners.remove(inProcess.getName());
+    }
+  }
+
+  public final String getJavaCommand(Process inProcess)
+  {
+    return super.getJavaCommand(inProcess) + " " + getJavaopts(inProcess);
+  }
+
+  private String getCmdline(Process inProcess)
+  {
+    String cmdline =
+      buildCmdLine(inProcess)
+      + " -port "
+      + getPort(inProcess)
+      + " -bindname "
+      + getBindName(inProcess);
+    System.out.println("Starting Listener with Command : " + cmdline);
+    return cmdline;
+  }
+  
+  private String buildCmdLine(Process inProcess)
+  {
+    String cmd = getJavaCommand(inProcess) + " ";
+    for (Iterator iterator = getMinusDProperties(inProcess).entrySet().iterator();
+      iterator.hasNext();
+      )
+    {
+      Map.Entry me = (Map.Entry)iterator.next();
+      cmd += "-D" + me.getKey() + "=" + me.getValue() + " ";
+    }
+    cmd += REMOTE_LISTENER_MAIN_CLASS;
+    return cmd;
+  }
+  
+  public Map getMinusDProperties(Process inProcess)
+  {
+    Map props = new HashMap(getConfiguration(inProcess).getMinusDProperties());
+    // localProps contain system properties set in a test class using ph.setSysProp()
+    Map localProps = new HashMap(getConfiguration(inProcess).getLocalMinusDProperties());
+    props.putAll(localProps);
+    return props;
+  }
+  
+  public void setSysProp(Process inProcess, String prop, String val)
+  {
+    if (getConfiguration(inProcess).isSysPropSet(prop))
+    {
+      getConfiguration(inProcess).addLocalMinusDProperty(prop, val);
+    }
+    else
+    {
+      throw new ProcessManagementRuntimeException(
+        "The system property "
+          + prop
+          + " cannot be overridden since a base value was not assigned."
+          + " Only properties which already have a base value may be overridden.");
+    }
+  }
+ 
+  // instead of writing this method, look into 
+  // extending from the exec-process-manager - should have all we need.
+  private void execOnLocalBox(Process inProcess)
+  {
+    File home = inProcess.getAbsoluteHome();
+    System.out.println(
+      "remote tch agent in directory: " + home.getAbsolutePath());
+    try
+    {
+      ExecTask execTask =
+        new ExecTask(
+          inProcess.getName() + inProcess.getCmdFileModifier(),
+          getCmdline(inProcess),
+          home.getAbsolutePath(),
+          inProcess.startInOwnWindow());
+      // should we also honor tch.process.log.basedir for the listener?
+      // should we also honor tch.process.merge-output-streams for the listener?
+      new RemoteExecTaskRunnerImpl().runExecTask(execTask);
+    }
+    catch (RemoteException ex)
+    {
+      throw new ProcessManagementRuntimeException(ex);
+    }
+    catch (TaskException ex)
+    {
+      throw new ProcessManagementRuntimeException(ex);
+    }
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerProcessManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerTestVehicle.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerTestVehicle.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerTestVehicle.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerTestVehicle.java Fri Aug 12 08:12:28 2005
@@ -1,99 +1,99 @@
-package org.apache.beehive.test.tools.tch.extension.process.listener;
-
-import org.apache.beehive.test.tools.tch.core.AntProperties;
-import org.apache.beehive.test.tools.tch.core.process.ProcessHandler;
-import org.apache.beehive.test.tools.tch.core.remote.test.*;
-import org.apache.beehive.test.tools.tch.core.test.TestLogicTask;
-import org.apache.beehive.test.tools.tch.core.test.vehicle.AbstractRMITestVehicle;
-import org.apache.beehive.test.tools.tch.task.RemoteTaskRunner;
-import org.apache.beehive.test.tools.tch.task.TaskException;
-import org.apache.beehive.test.tools.tch.task.TaskTransportException;
-
-/**
- * RemoteListenerTestVehicle is the test vehicle class used when a test is run using
- * a Tch agent as a test vehicle.
- * An instance of this exists on the client-side and facilitates the running
- * of the test on the remote task runner.
- */
-
-public class RemoteListenerTestVehicle
-  extends AbstractRMITestVehicle
-{
-  public RemoteListenerTestVehicle(String inName)
-  {
-    super(inName);
-  }
-
-  /**
-   * Main method for launching a test via this test vehicle
-   * 
-   * @param inProcessHandler the process handler representing the test vehicle
-   * @param inTask the actual task to run
-   */
-  public void runTestLogic(
-    ProcessHandler inProcessHandler,
-    TestLogicTask inTask)
-    throws TaskTransportException, TaskException
-  {
-    RemoteListenerProcessHandler ph = null;
-    try
-    {
-      ph = (RemoteListenerProcessHandler)inProcessHandler;
-    }
-    catch (ClassCastException ex)
-    {
-      throw new TaskTransportException(
-        ex,
-        "Got instance of "
-          + inProcessHandler.getClass().getName()
-          + " instead of  "
-          + "RemoteListenerProcessHandler "
-          + "as expected");
-    }
-    if (!ph.isAlive())
-    {
-      try
-      {
-        ph.startup();
-      }
-      catch (Exception ex)
-      {
-        throw new TaskTransportException(ex);
-      }
-    }
-    
-    try
-    {
-      RemoteTaskRunner runner = ph.lookup();
-
-      // run the task
-      runner.runTask(inTask);
-    }
-    catch (Throwable th)
-    {
-      isProblem(true);
-      
-      if (th instanceof TaskException)
-        throw (TaskException)th;
-      throw new TaskTransportException(
-        th,
-        "Problem when trying to run test task");
-    }
-    finally
-    {
-      // handle vehicle shutdown flags
-
-      // shutdown the vehicle if there was a problem
-      if (AntProperties.shutdownVMTestVehicleIfProblem())
-      {
-        if (isProblem())
-          ph.shutdown();
-      }
-
-      // shutdown
-      else if (AntProperties.shutdownVMTestVehicleAfterTest())
-        ph.shutdown();
-
-    }
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.process.listener;
+
+import org.apache.beehive.test.tools.tch.core.AntProperties;
+import org.apache.beehive.test.tools.tch.core.process.ProcessHandler;
+import org.apache.beehive.test.tools.tch.core.remote.test.*;
+import org.apache.beehive.test.tools.tch.core.test.TestLogicTask;
+import org.apache.beehive.test.tools.tch.core.test.vehicle.AbstractRMITestVehicle;
+import org.apache.beehive.test.tools.tch.task.RemoteTaskRunner;
+import org.apache.beehive.test.tools.tch.task.TaskException;
+import org.apache.beehive.test.tools.tch.task.TaskTransportException;
+
+/**
+ * RemoteListenerTestVehicle is the test vehicle class used when a test is run using
+ * a Tch agent as a test vehicle.
+ * An instance of this exists on the client-side and facilitates the running
+ * of the test on the remote task runner.
+ */
+
+public class RemoteListenerTestVehicle
+  extends AbstractRMITestVehicle
+{
+  public RemoteListenerTestVehicle(String inName)
+  {
+    super(inName);
+  }
+
+  /**
+   * Main method for launching a test via this test vehicle
+   * 
+   * @param inProcessHandler the process handler representing the test vehicle
+   * @param inTask the actual task to run
+   */
+  public void runTestLogic(
+    ProcessHandler inProcessHandler,
+    TestLogicTask inTask)
+    throws TaskTransportException, TaskException
+  {
+    RemoteListenerProcessHandler ph = null;
+    try
+    {
+      ph = (RemoteListenerProcessHandler)inProcessHandler;
+    }
+    catch (ClassCastException ex)
+    {
+      throw new TaskTransportException(
+        ex,
+        "Got instance of "
+          + inProcessHandler.getClass().getName()
+          + " instead of  "
+          + "RemoteListenerProcessHandler "
+          + "as expected");
+    }
+    if (!ph.isAlive())
+    {
+      try
+      {
+        ph.startup();
+      }
+      catch (Exception ex)
+      {
+        throw new TaskTransportException(ex);
+      }
+    }
+    
+    try
+    {
+      RemoteTaskRunner runner = ph.lookup();
+
+      // run the task
+      runner.runTask(inTask);
+    }
+    catch (Throwable th)
+    {
+      isProblem(true);
+      
+      if (th instanceof TaskException)
+        throw (TaskException)th;
+      throw new TaskTransportException(
+        th,
+        "Problem when trying to run test task");
+    }
+    finally
+    {
+      // handle vehicle shutdown flags
+
+      // shutdown the vehicle if there was a problem
+      if (AntProperties.shutdownVMTestVehicleIfProblem())
+      {
+        if (isProblem())
+          ph.shutdown();
+      }
+
+      // shutdown
+      else if (AntProperties.shutdownVMTestVehicleAfterTest())
+        ph.shutdown();
+
+    }
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerTestVehicle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerXMLHandler.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerXMLHandler.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerXMLHandler.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerXMLHandler.java Fri Aug 12 08:12:28 2005
@@ -1,90 +1,90 @@
-package org.apache.beehive.test.tools.tch.extension.process.listener;
-
-import java.util.Map;
-import java.util.HashMap;
-
-import org.apache.tools.ant.Location;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.apache.beehive.test.tools.tch.core.CallingChain;
-import org.apache.beehive.test.tools.tch.core.configuration.ElementConstants;
-import org.apache.beehive.test.tools.tch.core.configuration.MinimalConfigurationInfo;
-import org.apache.beehive.test.tools.tch.core.configuration.UnitConfigurationInfo;
-import org.apache.beehive.test.tools.tch.core.configuration.XMLHandler;
-import org.apache.beehive.test.tools.tch.util.time.Time;
-
-public class RemoteListenerXMLHandler
-  implements XMLHandler
-{
-  public UnitConfigurationInfo getUnitConfigurationInfo(Document in, Location inLocation, CallingChain inChain)
-  {
-    return null;
-  }
-
-  public MinimalConfigurationInfo getMinimalConfigurationInfo(Document doc)
-  {
-    RemoteListenerMinimalConfigurationInfo minConfInfo = 
-      new RemoteListenerMinimalConfigurationInfo();
-
-    String port = doc.getDocumentElement()
-      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_PORT_ATTR);
-    if (port != null && port.length() > 0)
-      minConfInfo.setPort(Integer.parseInt(port));
-
-    String bindname = doc.getDocumentElement()
-      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_BINDNAME_ATTR);
-    if (bindname != null && bindname.length() > 0)
-      minConfInfo.setBindName(bindname);
-
-    String javaopts = doc.getDocumentElement()
-      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_JAVAOPTS_ATTR);
-    if (javaopts != null && javaopts.length() > 0)
-      minConfInfo.setJavaopts(javaopts);
-    
-    NodeList propertyNodeList = 
-      doc.getDocumentElement()
-        .getElementsByTagName(
-          ElementConstants.LISTENER_PROCESS_CONFIG_PROPERTY_ELEMENT);
-    
-    Node node = null;
-    Element element = null;
-    Map propsMap = new HashMap();
-    String propName = null;
-    String propValue = null;
-    
-    for (int i = 0; i < propertyNodeList.getLength(); i++)
-    {
-      node = propertyNodeList.item(i);
-      if (node.getNodeType() == Node.ELEMENT_NODE)
-      {
-        element = (Element)node;
-        propName = element.getAttribute(
-          ElementConstants.LISTENER_PROCESS_CONFIG_PROPERTY_ELEMENT_NAME_ATTR);
-        propValue = element.getAttribute(
-          ElementConstants.LISTENER_PROCESS_CONFIG_PROPERTY_ELEMENT_VALUE_ATTR);
-        
-        if (propValue != null 
-          && !propValue.trim().equals("")
-          && propName != null
-          && !propName.trim().equals("") )
-        {
-          propsMap.put(propName, propValue);
-        }
-      }
-      
-      if (propsMap != null && propsMap.size() > 0)
-        minConfInfo.setMinusDProperties(propsMap);
-        
-    }
-    
-    String startupTimeout = doc.getDocumentElement()
-      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_STARTUP_TIMEOUT_ATTR);
-    if (startupTimeout != null && startupTimeout.length() > 0)
-      minConfInfo.setStartupTimeout(new Time(Integer.parseInt(startupTimeout), Time.SECONDS));
-      
-    return minConfInfo;
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.process.listener;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import org.apache.tools.ant.Location;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.beehive.test.tools.tch.core.CallingChain;
+import org.apache.beehive.test.tools.tch.core.configuration.ElementConstants;
+import org.apache.beehive.test.tools.tch.core.configuration.MinimalConfigurationInfo;
+import org.apache.beehive.test.tools.tch.core.configuration.UnitConfigurationInfo;
+import org.apache.beehive.test.tools.tch.core.configuration.XMLHandler;
+import org.apache.beehive.test.tools.tch.util.time.Time;
+
+public class RemoteListenerXMLHandler
+  implements XMLHandler
+{
+  public UnitConfigurationInfo getUnitConfigurationInfo(Document in, Location inLocation, CallingChain inChain)
+  {
+    return null;
+  }
+
+  public MinimalConfigurationInfo getMinimalConfigurationInfo(Document doc)
+  {
+    RemoteListenerMinimalConfigurationInfo minConfInfo = 
+      new RemoteListenerMinimalConfigurationInfo();
+
+    String port = doc.getDocumentElement()
+      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_PORT_ATTR);
+    if (port != null && port.length() > 0)
+      minConfInfo.setPort(Integer.parseInt(port));
+
+    String bindname = doc.getDocumentElement()
+      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_BINDNAME_ATTR);
+    if (bindname != null && bindname.length() > 0)
+      minConfInfo.setBindName(bindname);
+
+    String javaopts = doc.getDocumentElement()
+      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_JAVAOPTS_ATTR);
+    if (javaopts != null && javaopts.length() > 0)
+      minConfInfo.setJavaopts(javaopts);
+    
+    NodeList propertyNodeList = 
+      doc.getDocumentElement()
+        .getElementsByTagName(
+          ElementConstants.LISTENER_PROCESS_CONFIG_PROPERTY_ELEMENT);
+    
+    Node node = null;
+    Element element = null;
+    Map propsMap = new HashMap();
+    String propName = null;
+    String propValue = null;
+    
+    for (int i = 0; i < propertyNodeList.getLength(); i++)
+    {
+      node = propertyNodeList.item(i);
+      if (node.getNodeType() == Node.ELEMENT_NODE)
+      {
+        element = (Element)node;
+        propName = element.getAttribute(
+          ElementConstants.LISTENER_PROCESS_CONFIG_PROPERTY_ELEMENT_NAME_ATTR);
+        propValue = element.getAttribute(
+          ElementConstants.LISTENER_PROCESS_CONFIG_PROPERTY_ELEMENT_VALUE_ATTR);
+        
+        if (propValue != null 
+          && !propValue.trim().equals("")
+          && propName != null
+          && !propName.trim().equals("") )
+        {
+          propsMap.put(propName, propValue);
+        }
+      }
+      
+      if (propsMap != null && propsMap.size() > 0)
+        minConfInfo.setMinusDProperties(propsMap);
+        
+    }
+    
+    String startupTimeout = doc.getDocumentElement()
+      .getAttribute(ElementConstants.LISTENER_PROCESS_CONFIG_STARTUP_TIMEOUT_ATTR);
+    if (startupTimeout != null && startupTimeout.length() > 0)
+      minConfInfo.setStartupTimeout(new Time(Integer.parseInt(startupTimeout), Time.SECONDS));
+      
+    return minConfInfo;
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/process/listener/RemoteListenerXMLHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/AbstractUpdateListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/AbstractUpdateListener.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/AbstractUpdateListener.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/AbstractUpdateListener.java Fri Aug 12 08:12:28 2005
@@ -1,26 +1,26 @@
-package org.apache.beehive.test.tools.tch.extension.update;
-
-import org.w3c.dom.Node;
-
-import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
-
-/**
- * May provide logging in the future.
- * 
- */
-public abstract class AbstractUpdateListener implements TestUpdateListener
-{
-
- public void setConfiguration(Node n)
- {
- }	
-
-
-  public void init()
-  {
-  }
-
-  public void updateComplete(SourceControlManager scm)
-  {
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.update;
+
+import org.w3c.dom.Node;
+
+import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
+
+/**
+ * May provide logging in the future.
+ * 
+ */
+public abstract class AbstractUpdateListener implements TestUpdateListener
+{
+
+ public void setConfiguration(Node n)
+ {
+ }	
+
+
+  public void init()
+  {
+  }
+
+  public void updateComplete(SourceControlManager scm)
+  {
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/AbstractUpdateListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/DefaultUpdateListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/DefaultUpdateListener.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/DefaultUpdateListener.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/DefaultUpdateListener.java Fri Aug 12 08:12:28 2005
@@ -1,15 +1,15 @@
-package org.apache.beehive.test.tools.tch.extension.update;
-
-
-/**
- */
-public class DefaultUpdateListener extends AbstractUpdateListener implements TestUpdateListener
-{
-  public void update(TestUpdateDescriptor desc)
-  {
-    System.out.println(
-      "Cannot handle update for execution task "
-        + desc.getExecutionTask().getTaskName()
-        + "\n\n");
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.update;
+
+
+/**
+ */
+public class DefaultUpdateListener extends AbstractUpdateListener implements TestUpdateListener
+{
+  public void update(TestUpdateDescriptor desc)
+  {
+    System.out.println(
+      "Cannot handle update for execution task "
+        + desc.getExecutionTask().getTaskName()
+        + "\n\n");
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/DefaultUpdateListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptor.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptor.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptor.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptor.java Fri Aug 12 08:12:28 2005
@@ -1,29 +1,29 @@
-package org.apache.beehive.test.tools.tch.extension.update;
-
-import java.io.File;
-import java.util.Collection;
-
-import org.apache.beehive.test.tools.tch.core.ExecutionTask;
-import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
-
-/**
- */
-public interface TestUpdateDescriptor
-{
-  public String getTestName();
-  
-  public File getSourceFile();
-  
-  public int getLineNumber();
-  
-  public Collection getNewValues();
-  
-  public boolean isDelete();
-    
-  public String getEntityName();
-  
-  public SourceControlManager getSCM();
-  
-  // for now
-  public ExecutionTask getExecutionTask();
-}
+package org.apache.beehive.test.tools.tch.extension.update;
+
+import java.io.File;
+import java.util.Collection;
+
+import org.apache.beehive.test.tools.tch.core.ExecutionTask;
+import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
+
+/**
+ */
+public interface TestUpdateDescriptor
+{
+  public String getTestName();
+  
+  public File getSourceFile();
+  
+  public int getLineNumber();
+  
+  public Collection getNewValues();
+  
+  public boolean isDelete();
+    
+  public String getEntityName();
+  
+  public SourceControlManager getSCM();
+  
+  // for now
+  public ExecutionTask getExecutionTask();
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptorImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptorImpl.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptorImpl.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptorImpl.java Fri Aug 12 08:12:28 2005
@@ -1,141 +1,141 @@
-package org.apache.beehive.test.tools.tch.extension.update;
-
-import java.io.File;
-import java.util.Collection;
-
-import org.apache.beehive.test.tools.tch.core.ExecutionTask;
-import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
-
-/**
- * Simple data container.
- * 
- */
-public class TestUpdateDescriptorImpl implements TestUpdateDescriptor
-{
-  private String testName = null;
-  private File sourceFile = null;
-  private int lineNumber = -1;
-  private Collection newVals = null;
-  private boolean isDelete = false;
-  private String entityName = null;
-  private ExecutionTask execTask = null;
-  private SourceControlManager scm = null;
-
-  public String getTestName()
-  {
-    return testName;
-  }
-
-  public File getSourceFile()
-  {
-    return sourceFile;
-  }
-
-  public int getLineNumber()
-  {
-    return lineNumber;
-  }
-
-  public Collection getNewValues()
-  {
-    return newVals;
-  }
-
-  public String getEntityName()
-  {
-    return entityName;
-  }
-
-  public boolean isDelete()
-  {
-    return isDelete;
-  }
-  
-  public void setDelete(boolean b)
-  {
-  	isDelete = b;
-  }
-
-  public void setExecutionTask(ExecutionTask inExecTask)
-  {
-    execTask = inExecTask;
-  }
-
-  public ExecutionTask getExecutionTask()
-  {
-    return execTask;
-  }
-
-  public void setSourceFile(File f)
-  {
-    sourceFile = f;
-  }
-
-  /**
-  	 * @param s
-  	 */
-  public void setEntityName(String s)
-  {
-    entityName = s;
-  }
-
-  /**
-   * @param i
-   */
-  public void setLineNumber(int i)
-  {
-    lineNumber = i;
-  }
-
-  /**
-   * @param string
-   */
-  public void setNewValues(Collection c)
-  {
-    newVals = c;
-  }
-
-  /**
-   * @param string
-   */
-  public void setTestName(String string)
-  {
-    testName = string;
-  }
-
-  public void setSourceControlManager(SourceControlManager in)
-  {
-    scm = in;
-  }
-
-  public SourceControlManager getSCM()
-  {
-    return scm;
-  }
-
-  public String toString()
-  {
-    StringBuffer sb = new StringBuffer();
-    sb
-      .append("test name: ")
-      .append(testName)
-      .append("\n")
-      .append("entity name: ")
-      .append(entityName)
-      .append("\n")
-      .append("updated values: ")
-      .append(newVals)
-      .append("\n")
-      .append("file: ")
-      .append(sourceFile.getAbsolutePath())
-      .append("\n")
-      .append("execution task: ")
-      .append(execTask.getTaskName())
-      .append("\n")
-      .append("line: ")
-      .append(lineNumber)
-      .append("\n");
-
-    return sb.toString();
-  }
-}
+package org.apache.beehive.test.tools.tch.extension.update;
+
+import java.io.File;
+import java.util.Collection;
+
+import org.apache.beehive.test.tools.tch.core.ExecutionTask;
+import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
+
+/**
+ * Simple data container.
+ * 
+ */
+public class TestUpdateDescriptorImpl implements TestUpdateDescriptor
+{
+  private String testName = null;
+  private File sourceFile = null;
+  private int lineNumber = -1;
+  private Collection newVals = null;
+  private boolean isDelete = false;
+  private String entityName = null;
+  private ExecutionTask execTask = null;
+  private SourceControlManager scm = null;
+
+  public String getTestName()
+  {
+    return testName;
+  }
+
+  public File getSourceFile()
+  {
+    return sourceFile;
+  }
+
+  public int getLineNumber()
+  {
+    return lineNumber;
+  }
+
+  public Collection getNewValues()
+  {
+    return newVals;
+  }
+
+  public String getEntityName()
+  {
+    return entityName;
+  }
+
+  public boolean isDelete()
+  {
+    return isDelete;
+  }
+  
+  public void setDelete(boolean b)
+  {
+  	isDelete = b;
+  }
+
+  public void setExecutionTask(ExecutionTask inExecTask)
+  {
+    execTask = inExecTask;
+  }
+
+  public ExecutionTask getExecutionTask()
+  {
+    return execTask;
+  }
+
+  public void setSourceFile(File f)
+  {
+    sourceFile = f;
+  }
+
+  /**
+  	 * @param s
+  	 */
+  public void setEntityName(String s)
+  {
+    entityName = s;
+  }
+
+  /**
+   * @param i
+   */
+  public void setLineNumber(int i)
+  {
+    lineNumber = i;
+  }
+
+  /**
+   * @param string
+   */
+  public void setNewValues(Collection c)
+  {
+    newVals = c;
+  }
+
+  /**
+   * @param string
+   */
+  public void setTestName(String string)
+  {
+    testName = string;
+  }
+
+  public void setSourceControlManager(SourceControlManager in)
+  {
+    scm = in;
+  }
+
+  public SourceControlManager getSCM()
+  {
+    return scm;
+  }
+
+  public String toString()
+  {
+    StringBuffer sb = new StringBuffer();
+    sb
+      .append("test name: ")
+      .append(testName)
+      .append("\n")
+      .append("entity name: ")
+      .append(entityName)
+      .append("\n")
+      .append("updated values: ")
+      .append(newVals)
+      .append("\n")
+      .append("file: ")
+      .append(sourceFile.getAbsolutePath())
+      .append("\n")
+      .append("execution task: ")
+      .append(execTask.getTaskName())
+      .append("\n")
+      .append("line: ")
+      .append(lineNumber)
+      .append("\n");
+
+    return sb.toString();
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateDescriptorImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateListener.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateListener.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateListener.java Fri Aug 12 08:12:28 2005
@@ -1,37 +1,37 @@
-package org.apache.beehive.test.tools.tch.extension.update;
-
-import org.w3c.dom.Node;
-
-import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
-
-/**
- * Implementors of this interface receives update events.
- * 
- */
-public interface TestUpdateListener
-{
-  /**
-   * Called with additional configuration information.
-   */
-  public void setConfiguration(Node n);	
-	
-  /**
-   * Called once before calls to update are about to happen.
-   */
-  public void init();
-  
-  /**
-   * Called once for every (test,update entity) pair.
-   * 
-   * @param desc Provides access to various information required to 
-   *             preform the update.
-   */
-  public void update(TestUpdateDescriptor desc);
-  
-  
-  /**
-   * Called once at the end of the update process, after all calls
-   * to update have occured.
-   */
-  public void updateComplete(SourceControlManager scm);
-}
+package org.apache.beehive.test.tools.tch.extension.update;
+
+import org.w3c.dom.Node;
+
+import org.apache.beehive.test.tools.tch.scm.SourceControlManager;
+
+/**
+ * Implementors of this interface receives update events.
+ * 
+ */
+public interface TestUpdateListener
+{
+  /**
+   * Called with additional configuration information.
+   */
+  public void setConfiguration(Node n);	
+	
+  /**
+   * Called once before calls to update are about to happen.
+   */
+  public void init();
+  
+  /**
+   * Called once for every (test,update entity) pair.
+   * 
+   * @param desc Provides access to various information required to 
+   *             preform the update.
+   */
+  public void update(TestUpdateDescriptor desc);
+  
+  
+  /**
+   * Called once at the end of the update process, after all calls
+   * to update have occured.
+   */
+  public void updateComplete(SourceControlManager scm);
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/extension/update/TestUpdateListener.java
------------------------------------------------------------------------------
    svn:eol-style = native