mstover1    01/06/12 15:36:21

  Modified:    .        README build.xml
               docs     changes.html running.html
               src/org/apache/jmeter/config Arguments.java
               src/org/apache/jmeter/protocol/http/config UrlConfig.java
               src/org/apache/jmeter/threads ThreadGroup.java
               xdocs    changes.xml
  Log:
  Fixing bug with argument values being lost
  
  Revision  Changes    Path
  1.6       +11 -0     jakarta-jmeter/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/README,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- README    2001/06/08 00:18:49     1.5
  +++ README    2001/06/12 22:36:12     1.6
  @@ -62,6 +62,17 @@
     "build install" (Unix/Linux only).  This should compile the application and 
enable you to run jmeter from the /bin
   directory.
   
  +        NOTES for 1.6.1
  +        ---------------
  +
  +        JDBC testing does not appear to be working correctly in this version.
  +
  +        Saving and reloading test scripts has been fixed in this version.  Saving 
and testing of listeners and timers is
  +also working.
  +
  +        HTTP testing now supports HTTPS.  Alternate ports can also be tested in 
this version.  Minor bugs with cookies
  +has been fixed.
  +
   
   
     Licensing and legal issues
  
  
  
  1.27      +1 -1      jakarta-jmeter/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/build.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- build.xml 2001/05/10 18:55:12     1.26
  +++ build.xml 2001/06/12 22:36:12     1.27
  @@ -7,7 +7,7 @@
     <property name="sources.src.dir" value="src"/>
     <!-- Where the API documentation lives -->
     <property name="docs.api.dest.dir" value="docs/api"/>
  -  <property name="version" value="_1.6Alpha"/>
  +  <property name="version" value="_1.6.1"/>
     <property name="docs.src" value="./xdocs"/>
     <property name="docs.dest" value="./docs"/>
   
  
  
  
  1.23      +8 -0      jakarta-jmeter/docs/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/docs/changes.html,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- changes.html      2001/03/24 20:44:22     1.22
  +++ changes.html      2001/06/12 22:36:13     1.23
  @@ -81,6 +81,14 @@
   (least recent)</b> 
   </p>
                                                   <b>Changes:</b>
  +                                                <h3>Version 1.6.1</h3>
  +                                                <ul>
  +<li>Fixed saving and loading of test scripts (no more extra lines)</li>
  +<li>Can save and load special characters (such as "&amp;" and "&lt;").</li>
  +<li>Can save and load timers and listeners.</li>
  +<li>Minor bug fix for cookies (if you cookie value contained an "=", then it 
broke).</li>
  +<li>URL's can sample ports other than 80, and can test HTTPS, provided you have the 
necessary jars (JSSE)</li>
  +</ul>
                                                   <h3>Version 1.6 Alpha</h3>
                                                   <ul>
   <li>New UI</li>
  
  
  
  1.14      +0 -0      jakarta-jmeter/docs/running.html
  
  Index: running.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/docs/running.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- running.html      2001/04/11 12:45:02     1.13
  +++ running.html      2001/06/12 22:36:13     1.14
  @@ -151,7 +151,7 @@
   </blockquote>
                                                   <p align="center"><font 
size="-1">Copyright (c) 1998-99 <a href="http://java.apache.org";>The Java Apache
   Project</a>.<br />
  -$Id: running.html,v 1.13 2001/04/11 12:45:02 mstover1 Exp $</font> <br />
  +$Id: running.html,v 1.14 2001/06/12 22:36:13 mstover1 Exp $</font> <br />
   <font size="-1">All rights reserved.</font></p>
                               </blockquote>
         </td></tr>
  
  
  
  1.7       +17 -1     jakarta-jmeter/src/org/apache/jmeter/config/Arguments.java
  
  Index: Arguments.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/config/Arguments.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Arguments.java    2001/03/17 22:25:42     1.6
  +++ Arguments.java    2001/06/12 22:36:15     1.7
  @@ -65,7 +65,7 @@
    *  Apache Foundation
    *
    *@author     Michael Stover
  - *@created    $Date: 2001/03/17 22:25:42 $
  + *@created    $Date: 2001/06/12 22:36:15 $
    *@version    1.0
    ***********************************************************/
   
  @@ -289,6 +289,22 @@
        public Iterator iterator()
        {
                return args.iterator();
  +     }
  +
  +     public String toString()
  +     {
  +             StringBuffer str = new StringBuffer();
  +             Iterator iter = args.iterator();
  +             while (iter.hasNext())
  +             {
  +                     Argument arg = (Argument)iter.next();
  +                     str.append(arg.name+"="+arg.value);
  +                     if(iter.hasNext())
  +                     {
  +                             str.append("&");
  +                     }
  +             }
  +             return str.toString();
        }
   
   }
  
  
  
  1.12      +419 -282  
jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/UrlConfig.java
  
  Index: UrlConfig.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/protocol/http/config/UrlConfig.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- UrlConfig.java    2001/06/08 17:47:36     1.11
  +++ UrlConfig.java    2001/06/12 22:36:17     1.12
  @@ -1,282 +1,419 @@
  -/*
  - * ====================================================================
  - * The Apache Software License, Version 1.1
  - *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - * notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - * notice, this list of conditions and the following disclaimer in
  - * the documentation and/or other materials provided with the
  - * distribution.
  - *
  - * 3. The end-user documentation included with the redistribution,
  - * if any, must include the following acknowledgment:
  - * "This product includes software developed by the
  - * Apache Software Foundation (http://www.apache.org/)."
  - * Alternately, this acknowledgment may appear in the software itself,
  - * if and wherever such third-party acknowledgments normally appear.
  - *
  - * 4. The names "Apache" and "Apache Software Foundation" and
  - * "Apache JMeter" must not be used to endorse or promote products
  - * derived from this software without prior written permission. For
  - * written permission, please contact [EMAIL PROTECTED]
  - *
  - * 5. Products derived from this software may not be called "Apache",
  - * "Apache JMeter", nor may "Apache" appear in their name, without
  - * prior written permission of the Apache Software Foundation.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * ====================================================================
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - */
  - package org.apache.jmeter.protocol.http.config;
  -
  -import java.util.*;
  -import java.net.*;
  -
  -import org.apache.jmeter.config.*;
  -
  -/************************************************************
  - *  Title: Apache JMeter Description: Copyright: Copyright (c) 2000 Company:
  - *  Apache Foundation
  - *
  - *@author     Michael Stover
  - *@created    $Date: 2001/06/08 17:47:36 $
  - *@version    $Revision: 1.11 $
  - ***********************************************************/
  -
  -public class UrlConfig extends AbstractConfigElement
  -{
  -     public final static String DOMAIN = "domain";
  -      public final static String PORT = "port";
  -     public final static String PATH = "path";
  -     public final static String METHOD = "method";
  -     public final static String ARGUMENTS = "arguments";
  -     public final static String POST = "POST";
  -     public final static String PROTOCOL = "PROTOCOL";
  -     public final static String GET = "GET";
  -
  -     /************************************************************
  -      *  Constructor for the UrlConfig object
  -      ***********************************************************/
  -     public UrlConfig()
  -     {
  -             setDomain("");
  -             setPath("");
  -             this.putProperty(ARGUMENTS,new Arguments());
  -     }
  -
  -     public boolean expectsModification()
  -     {
  -             return false;
  -     }
  -
  -     /************************************************************
  -      *  !ToDoo (Method description)
  -      *
  -      *@return                            !ToDo (Return description)
  -      *@exception  MalformedURLException  !ToDo (Exception description)
  -      ***********************************************************/
  -     public URL getUrl() throws MalformedURLException
  -     {
  -             String pathAndQuery = null;
  -             if(this.getMethod().equals(this.GET) && getQueryString().length() > 0)
  -             {
  -                     pathAndQuery = this.getPath()+"?"+getQueryString();
  -             }
  -             else
  -             {
  -                     pathAndQuery = this.getPath();
  -             }
  -             if(!pathAndQuery.startsWith("/"))
  -             {
  -                     pathAndQuery = "/" + pathAndQuery;
  -             }
  -             if(getPort() == 0)
  -             {
  -                     return new URL(getProtocol(),getDomain(),pathAndQuery);
  -             }
  -             else
  -             {
  -                     return new URL(getProtocol(), (String)properties.get(DOMAIN), 
getPort(),
  -                                               pathAndQuery);
  -             }
  -     }
  -
  -     public void setMethod(String meth)
  -     {
  -             properties.put(METHOD,meth);
  -     }
  -
  -      public int getPort() {
  -                     Object port = properties.get(PORT);
  -                     if(port == null)
  -                     {
  -                             properties.remove(PORT);
  -                             return 0;
  -                     }
  -                     else if(port instanceof Integer)
  -                     {
  -                             return ((Integer)port).intValue();
  -                     }
  -                     else if(port instanceof String)
  -                     {
  -                             Integer intPort = new Integer((String)port);
  -                             properties.put(PORT,intPort);
  -                             return intPort.intValue();
  -                     }
  -                     return 0;
  -      }
  -
  -      public String getProtocol()
  -      {
  -             String protocol = (String)getProperty(PROTOCOL);
  -             return protocol;
  -      }
  -
  -      public void setProtocol(String protocol)
  -      {
  -             properties.put(PROTOCOL,protocol);
  -      }
  -
  -      public void setPort(int port) {
  -     properties.put(PORT, new Integer(port));
  -     if(port == 0)
  -     {
  -             properties.remove(PORT);
  -     }
  -      }
  -
  -     public String getPath()
  -     {
  -             return (String)properties.get(PATH);
  -     }
  -
  -     public void setPath(String path)
  -     {
  -             properties.put(PATH,path);
  -     }
  -
  -     public String getDomain()
  -     {
  -             return (String)properties.get(DOMAIN);
  -     }
  -
  -     public void setDomain(String domain)
  -     {
  -             properties.put(DOMAIN,domain);
  -     }
  -
  -     public String getMethod()
  -     {
  -             return (String)properties.get(METHOD);
  -     }
  -
  -     /************************************************************
  -      *  !ToDo (Method description)
  -      *
  -      *@return    !ToDo (Return description)
  -      ***********************************************************/
  -     public Object clone()
  -     {
  -             UrlConfig newConfig = new UrlConfig();
  -             configureClone(newConfig);
  -             return newConfig;
  -     }
  -
  -     /************************************************************
  -      *  This allows config elements to combine and give a "layered" effect. for
  -      *  example, say there are two HTTPConfigElements, which have properties for
  -      *  domain, path, method, and parameters. If element A has everything filled
  -      *  in, but null for domain, and element B is added, which has only domain
  -      *  filled in, then after adding B to A, A will have the domain from B. If A
  -      *  already had a domain, then the correct behavior is for A to ignore the
  -      *  addition of element B.
  -      *
  -      *@param  config  !ToDo
  -      ***********************************************************/
  -     public void addConfigElement(ConfigElement config)
  -     {
  -             if (config instanceof UrlConfig)
  -             {
  -                     updatePropertyIfAbsent((UrlConfig)config);
  -             }
  -     }
  -
  -     public Arguments getArguments()
  -     {
  -             return (Arguments)getProperty(this.ARGUMENTS);
  -     }
  -
  -     public String getQueryString()
  -     {
  -             StringBuffer buf = new StringBuffer();
  -             Iterator iter = getArguments().iterator();
  -             boolean first = true;
  -             while (iter.hasNext())
  -             {
  -                     Argument item = (Argument)iter.next();
  -                     if (!first)
  -                     {
  -                             buf.append("&");
  -                     }
  -                     else
  -                     {
  -                             first = false;
  -                     }
  -                     buf.append(item.getName() + "=" + item.getValue());
  -             }
  -             return buf.toString();
  -     }
  -
  -     public Class getGuiClass()
  -     {
  -             return org.apache.jmeter.protocol.http.config.gui.UrlConfigGui.class;
  -     }
  -
  -     public String getClassLabel()
  -     {
  -             return "Url Sample";
  -     }
  -
  -     public boolean isComplete()
  -     {
  -             boolean isGood = false;
  -             try
  -             {
  -                     this.getUrl();
  -                     isGood = true;
  -             }
  -             catch (Exception ex)
  -             {
  -             }
  -             return isGood;
  -     }
  -}
  -
  -
  -
  -
  +/*
  + * ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + * notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + * notice, this list of conditions and the following disclaimer in
  + * the documentation and/or other materials provided with the
  + * distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + * if any, must include the following acknowledgment:
  + * "This product includes software developed by the
  + * Apache Software Foundation (http://www.apache.org/)."
  + * Alternately, this acknowledgment may appear in the software itself,
  + * if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + * "Apache JMeter" must not be used to endorse or promote products
  + * derived from this software without prior written permission. For
  + * written permission, please contact [EMAIL PROTECTED]
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + * "Apache JMeter", nor may "Apache" appear in their name, without
  + * prior written permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
  +package org.apache.jmeter.protocol.http.config;
  +
  +import java.util.*;
  +import java.net.*;
  +
  +import org.apache.jmeter.config.*;
  +import org.apache.jmeter.util.JMeterUtils;
  +
  +/**
  + *  Title: Apache JMeter Description: Copyright: Copyright (c) 2000 Company:
  + *  Apache Foundation
  + *
  + *@author     Michael Stover
  + *@created    $Date: 2001/06/12 22:36:17 $
  + *@version    $Revision: 1.12 $
  + */
  +
  +public class UrlConfig extends AbstractConfigElement
  +{
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String DOMAIN = "domain";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String PORT = "port";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String PATH = "path";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String METHOD = "method";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String ARGUMENTS = "arguments";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String POST = "POST";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String PROTOCOL = "PROTOCOL";
  +     /**
  +      *  Description of the Field
  +      */
  +     public final static String GET = "GET";
  +
  +     /**
  +      *  Constructor for the UrlConfig object
  +      */
  +     public UrlConfig()
  +     {
  +             setDomain("");
  +             setPath("");
  +             this.putProperty(ARGUMENTS, new Arguments());
  +     }
  +
  +     /**
  +      *  Sets the Method attribute of the UrlConfig object
  +      *
  +      *@param  meth  The new Method value
  +      */
  +     public void setMethod(String meth)
  +     {
  +             properties.put(METHOD, meth);
  +     }
  +
  +     /**
  +      *  Sets the Protocol attribute of the UrlConfig object
  +      *
  +      *@param  protocol  The new Protocol value
  +      */
  +     public void setProtocol(String protocol)
  +     {
  +             properties.put(PROTOCOL, protocol);
  +     }
  +
  +     /**
  +      *  Sets the Port attribute of the UrlConfig object
  +      *
  +      *@param  port  The new Port value
  +      */
  +     public void setPort(int port)
  +     {
  +             properties.put(PORT, new Integer(port));
  +             if (port == 0)
  +             {
  +                     properties.remove(PORT);
  +             }
  +     }
  +
  +     /**
  +      *  Sets the Path attribute of the UrlConfig object
  +      *
  +      *@param  path  The new Path value
  +      */
  +     public void setPath(String path)
  +     {
  +             int index = path.indexOf("?");
  +             if (index >= 0)
  +             {
  +                     String queryString = path.substring(index + 1);
  +                     properties.put(PATH, path.substring(0, index));
  +                     parseArguments(queryString);
  +             }
  +             else
  +             {
  +                     properties.put(PATH, path);
  +             }
  +     }
  +
  +     public void addArgument(String name,String value)
  +     {
  +             Arguments args = this.getArguments();
  +             args.addArgument(name,value);
  +     }
  +
  +     /**
  +      *  Sets the Domain attribute of the UrlConfig object
  +      *
  +      *@param  domain  The new Domain value
  +      */
  +     public void setDomain(String domain)
  +     {
  +             properties.put(DOMAIN, domain);
  +     }
  +
  +     /**
  +      *  !ToDoo (Method description)
  +      *
  +      *@return                            !ToDo (Return description)
  +      *@exception  MalformedURLException  !ToDo (Exception description)
  +      */
  +     public URL getUrl() throws MalformedURLException
  +     {
  +             String pathAndQuery = null;
  +             if (this.getMethod().equals(this.GET) && getQueryString().length() > 0)
  +             {
  +                     pathAndQuery = this.getPath() + "?" + getQueryString();
  +             }
  +             else
  +             {
  +                     pathAndQuery = this.getPath();
  +             }
  +             if (!pathAndQuery.startsWith("/"))
  +             {
  +                     pathAndQuery = "/" + pathAndQuery;
  +             }
  +             if (getPort() == 0)
  +             {
  +                     return new URL(getProtocol(), getDomain(), pathAndQuery);
  +             }
  +             else
  +             {
  +                     return new URL(getProtocol(), (String) properties.get(DOMAIN), 
getPort(),
  +                                     pathAndQuery);
  +             }
  +     }
  +
  +     /**
  +      *  Gets the Port attribute of the UrlConfig object
  +      *
  +      *@return    The Port value
  +      */
  +     public int getPort()
  +     {
  +             Object port = properties.get(PORT);
  +             if (port == null)
  +             {
  +                     properties.remove(PORT);
  +                     return 0;
  +             }
  +             else if (port instanceof Integer)
  +             {
  +                     return ((Integer) port).intValue();
  +             }
  +             else if (port instanceof String)
  +             {
  +                     Integer intPort = new Integer((String) port);
  +                     properties.put(PORT, intPort);
  +                     return intPort.intValue();
  +             }
  +             return 0;
  +     }
  +
  +     /**
  +      *  Gets the Protocol attribute of the UrlConfig object
  +      *
  +      *@return    The Protocol value
  +      */
  +     public String getProtocol()
  +     {
  +             String protocol = (String) getProperty(PROTOCOL);
  +             return protocol;
  +     }
  +
  +     /**
  +      *  Gets the Path attribute of the UrlConfig object
  +      *
  +      *@return    The Path value
  +      */
  +     public String getPath()
  +     {
  +             return (String) properties.get(PATH);
  +     }
  +
  +     /**
  +      *  Gets the Domain attribute of the UrlConfig object
  +      *
  +      *@return    The Domain value
  +      */
  +     public String getDomain()
  +     {
  +             return (String) properties.get(DOMAIN);
  +     }
  +
  +     /**
  +      *  Gets the Method attribute of the UrlConfig object
  +      *
  +      *@return    The Method value
  +      */
  +     public String getMethod()
  +     {
  +             return (String) properties.get(METHOD);
  +     }
  +
  +     /**
  +      *  Gets the Arguments attribute of the UrlConfig object
  +      *
  +      *@return    The Arguments value
  +      */
  +     public Arguments getArguments()
  +     {
  +             return (Arguments) getProperty(this.ARGUMENTS);
  +     }
  +
  +     /**
  +      *  Gets the QueryString attribute of the UrlConfig object
  +      *
  +      *@return    The QueryString value
  +      */
  +     public String getQueryString()
  +     {
  +             StringBuffer buf = new StringBuffer();
  +             Iterator iter = getArguments().iterator();
  +             boolean first = true;
  +             while (iter.hasNext())
  +             {
  +                     Argument item = (Argument) iter.next();
  +                     if (!first)
  +                     {
  +                             buf.append("&");
  +                     }
  +                     else
  +                     {
  +                             first = false;
  +                     }
  +                     buf.append(item.getName() + "=" + item.getValue());
  +             }
  +             return buf.toString();
  +     }
  +
  +     /**
  +      *  Gets the GuiClass attribute of the UrlConfig object
  +      *
  +      *@return    The GuiClass value
  +      */
  +     public Class getGuiClass()
  +     {
  +             return org.apache.jmeter.protocol.http.config.gui.UrlConfigGui.class;
  +     }
  +
  +     /**
  +      *  Gets the ClassLabel attribute of the UrlConfig object
  +      *
  +      *@return    The ClassLabel value
  +      */
  +     public String getClassLabel()
  +     {
  +             return "Url Sample";
  +     }
  +
  +     /**
  +      *  Gets the Complete attribute of the UrlConfig object
  +      *
  +      *@return    The Complete value
  +      */
  +     public boolean isComplete()
  +     {
  +             boolean isGood = false;
  +             try
  +             {
  +                     this.getUrl();
  +                     isGood = true;
  +             }
  +             catch (Exception ex)
  +             {
  +             }
  +             return isGood;
  +     }
  +
  +     /**
  +      *  Description of the Method
  +      *
  +      *@return    Description of the Returned Value
  +      */
  +     public boolean expectsModification()
  +     {
  +             return false;
  +     }
  +
  +     /**
  +      *  !ToDo (Method description)
  +      *
  +      *@return    !ToDo (Return description)
  +      */
  +     public Object clone()
  +     {
  +             UrlConfig newConfig = new UrlConfig();
  +             configureClone(newConfig);
  +             return newConfig;
  +     }
  +
  +     /**
  +      *  This allows config elements to combine and give a "layered" effect. for
  +      *  example, say there are two HTTPConfigElements, which have properties for
  +      *  domain, path, method, and parameters. If element A has everything filled
  +      *  in, but null for domain, and element B is added, which has only domain
  +      *  filled in, then after adding B to A, A will have the domain from B. If A
  +      *  already had a domain, then the correct behavior is for A to ignore the
  +      *  addition of element B.
  +      *
  +      *@param  config  !ToDo
  +      */
  +     public void addConfigElement(ConfigElement config)
  +     {
  +             if (config instanceof UrlConfig)
  +             {
  +                     updatePropertyIfAbsent((UrlConfig) config);
  +             }
  +     }
  +
  +     public void parseArguments(String queryString)
  +     {
  +             System.out.println("Querystring = "+queryString);
  +             String[] args = JMeterUtils.split(queryString, "&");
  +             for (int i = 0; i < args.length; i++)
  +             {
  +                     int index = args[i].indexOf("=");
  +                     if(index > -1)
  +                     {
  +                             String name = args[i].substring(0,index);
  +                             String value = args[i].substring(index + 1);
  +                             addArgument(name, value);
  +                     }
  +             }
  +     }
  +}
  +
  +
  
  
  
  1.8       +4 -4      jakarta-jmeter/src/org/apache/jmeter/threads/ThreadGroup.java
  
  Index: ThreadGroup.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/threads/ThreadGroup.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ThreadGroup.java  2001/03/17 22:25:57     1.7
  +++ ThreadGroup.java  2001/06/12 22:36:19     1.8
  @@ -72,7 +72,7 @@
    *  Apache Foundation
    *
    *@author     Michael Stover
  - *@created    $Date: 2001/03/17 22:25:57 $
  + *@created    $Date: 2001/06/12 22:36:19 $
    *@version    1.0
    ***********************************************************/
   
  @@ -372,7 +372,7 @@
         */
        private class SampleQueue implements Runnable
        {
  -             LinkedList occurredQ = new LinkedList();
  +             List occurredQ = Collections.synchronizedList(new LinkedList());
   
                public SampleQueue()
                {
  @@ -381,7 +381,7 @@
   
                public synchronized void sampleOccurred(SampleEvent e)
                {
  -                     occurredQ.addLast(e);
  +                     occurredQ.add(e);
                        this.notify();
                }
   
  @@ -392,7 +392,7 @@
                        {
                                try
                                {
  -                                     event = (SampleEvent)occurredQ.removeFirst();
  +                                     event = (SampleEvent)occurredQ.remove(0);
                                }
                                catch (Exception ex)
                                {
  
  
  
  1.3       +8 -0      jakarta-jmeter/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/xdocs/changes.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- changes.xml       2001/03/24 20:44:24     1.2
  +++ changes.xml       2001/06/12 22:36:21     1.3
  @@ -12,6 +12,14 @@
   </p>
   
   <b>Changes:</b>
  +<h3>Version 1.6.1</h3>
  +<ul>
  +<li>Fixed saving and loading of test scripts (no more extra lines)</li>
  +<li>Can save and load special characters (such as &quot;&amp;&quot; and 
&quot;&lt;&quot;).</li>
  +<li>Can save and load timers and listeners.</li>
  +<li>Minor bug fix for cookies (if you cookie value contained an &quot;=&quot;, then 
it broke).</li>
  +<li>URL's can sample ports other than 80, and can test HTTPS, provided you have the 
necessary jars (JSSE)</li>
  +</ul>
   <h3>Version 1.6 Alpha</h3>
   <ul>
   <li>New UI</li>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to