Package org.apache.jmeter.protocol.http.util

Examples of org.apache.jmeter.protocol.http.util.HTTPArgument


        this.getArguments().addArgument(new HTTPArgument(name, value));
    }

  public void addArgument(String name, String value, String metadata)
  {
    this.getArguments().addArgument(new HTTPArgument(name, value, metadata));
  }
View Full Code Here


        StringBuffer buf= new StringBuffer();
        PropertyIterator iter= getArguments().iterator();
        boolean first= true;
        while (iter.hasNext())
        {
            HTTPArgument item= null;
            try
            {
                item= (HTTPArgument)iter.next().getObjectValue();
            }
            catch (ClassCastException e)
            {
                item= new HTTPArgument((Argument)iter.next().getObjectValue());
            }
            if (!first)
            {
                buf.append("&");
            }
            else
            {
                first= false;
            }
            buf.append(item.getEncodedName());
            if (item.getMetaData() == null)
            {
                buf.append("=");
            }
            else
            {
                buf.append(item.getMetaData());
            }
            buf.append(item.getEncodedValue());
        }
        return buf.toString();
    }
View Full Code Here

        (
            (Arguments) config
                .getProperty(HTTPSampler.ARGUMENTS)
                .getObjectValue())
                .addArgument(
            new HTTPArgument("config1", "configValue"));
        config.setRunningVersion(true);
        sampler.setRunningVersion(true);
        sampler.setRunningVersion(true);
        sampler.addTestElement(config);
        assertEquals(
View Full Code Here

        }
        else
        {
            sampler.getArguments().removeArgument(getArgumentName());
            sampler.getArguments().addArgument(
                new HTTPArgument(getArgumentName(), value, true));
        }
    }
View Full Code Here

                new Class[] {
                    String.class,
                    String.class,
                    Boolean.class,
                    Boolean.class },
                new HTTPArgument());
    }
View Full Code Here

        table.setAutoResizeMode(resizeMode);
    }

    protected Object makeNewArgument()
    {
        HTTPArgument arg = new HTTPArgument("", "");
        arg.setAlwaysEncoded(false);
        arg.setUseEquals(true);
        return arg;
    }
View Full Code Here

    {
        Iterator modelData = tableModel.iterator();
        Arguments args = new Arguments();
        while (modelData.hasNext())
        {
            HTTPArgument arg = (HTTPArgument) modelData.next();
            args.addArgument(arg);
        }
        this.configureTestElement(args);
        return (TestElement) args.clone();
    }
View Full Code Here

            tableModel.clearData();
            HTTPArgument.convertArgumentsToHTTP((Arguments) el);
            PropertyIterator iter = ((Arguments) el).getArguments().iterator();
            while (iter.hasNext())
            {
                HTTPArgument arg = (HTTPArgument) iter.next().getObjectValue();
                tableModel.addRow(arg);
            }
        }
        checkDeleteStatus();
    }
View Full Code Here

        }
        else
        {
            sampler.getArguments().removeArgument(getArgumentName());
            sampler.getArguments().addArgument(
                new HTTPArgument(getArgumentName(), value, true));
        }
    }
View Full Code Here

                + " value: "
                + value
                + " metaData: "
                + metaData);

        HTTPArgument arg= new HTTPArgument(name, value, metaData, true);

        if (arg.getName().equals(arg.getEncodedName())
            && arg.getValue().equals(arg.getEncodedValue()))
        {
            arg.setAlwaysEncoded(false);
        }
    this.getArguments().addArgument(arg);
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.protocol.http.util.HTTPArgument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.