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

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


    this.getArguments().addArgument(arg);
    }

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


        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

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

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

  }

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

  }
 
  public void addEncodedArgument(String name,String value)
  {
    Arguments args = getArguments();
    HTTPArgument arg = new HTTPArgument(name,value,true);
    if(arg.getName().equals(arg.getEncodedName()) && arg.getValue().equals(arg.getEncodedValue()))
    {
      arg.setAlwaysEncode(false);
    }
    args.addArgument(new HTTPArgument(name,value,true));
  }
View Full Code Here

    model.reset();
    while(model.next())
    {
      if(((Boolean)model.getColumnValue(ENCODE_OR_NOT)).booleanValue())
      {
        args.addArgument(new HTTPArgument((String)model.getColumnValue(Arguments.COLUMN_NAMES[0]),
            model.getColumnValue(Arguments.COLUMN_NAMES[1])));
      }
      else
      {
        HTTPArgument arg = new HTTPArgument();
        arg.setAlwaysEncode(false);
        arg.setName((String)model.getColumnValue(Arguments.COLUMN_NAMES[0]));
        arg.setValue(model.getColumnValue(Arguments.COLUMN_NAMES[1]));
        args.addArgument(arg);
      }
    }
    this.configureTestElement(args);
    return (TestElement)args.clone();
View Full Code Here

      tableModel.clearData();
      HTTPArgument.convertArgumentsToHTTP((Arguments)el);
      Iterator iter = ((Arguments)el).getArguments().iterator();
      while(iter.hasNext())
      {
        HTTPArgument arg = (HTTPArgument)iter.next();
        tableModel.addRow(new Object[]{arg.getName(),arg.getValue(),
            new Boolean(arg.getAlwaysEncode())});
      }
    }
    checkDeleteStatus();
  }
View Full Code Here

    return getPropertyAsBoolean(USE_KEEPALIVE);
  }
  public void addEncodedArgument(String name, String value, String metaData)
  {
    Arguments args = getArguments();
    HTTPArgument arg = new HTTPArgument(name, value, metaData, true);
    if (arg.getName().equals(arg.getEncodedName())
      && arg.getValue().equals(arg.getEncodedValue()))
    {
      arg.setAlwaysEncode(false);
    }
    args.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.