Apache JMeter
2.0.1.20050615

org.apache.jmeter.protocol.http.control
Class HeaderManager

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.config.ConfigTestElement
          extended byorg.apache.jmeter.protocol.http.control.HeaderManager
All Implemented Interfaces:
Cloneable, Serializable, TestElement

public class HeaderManager
extends ConfigTestElement
implements Serializable

This class provides an interface to headers file to pass HTTP headers along with a request.

Version:
$Revision: 1.9.2.1 $ $Date: 2004/05/19 21:24:24 $
Author:
Giacomo Pati
See Also:
Serialized Form

Field Summary
static String HEADERS
           
 
Fields inherited from class org.apache.jmeter.config.ConfigTestElement
PASSWORD, USERNAME
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
HeaderManager()
           
 
Method Summary
 void add()
          Add an empty header.
 void add(Header h)
          Add a header.
 void addFile(String headerFile)
          Add header data from a file.
 Header get(int i)
          Return the header at index i.
 String getClassLabel()
           
 Class getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 Header getHeader(int row)
           
 CollectionProperty getHeaders()
           
 Object getSOAPHeader()
          Added support for SOAP related header stuff. 1-29-04 Peter Lin
 void remove(int index)
          Remove a header.
 void removeHeaderNamed(String name)
           
 void save(String headFile)
          Save the header data to a file.
 void setSOAPHeader(Object header)
          Set the SOAPHeader with the SOAPHTTPConnection object.
 int size()
          Return the number of headers.
 String[] split(String splittee, String splitChar, String def)
          Takes a String and a tokenizer character, and returns a new array of strings of the string split by the tokenizer character.
 
Methods inherited from class org.apache.jmeter.config.ConfigTestElement
addTestElement
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADERS

public static final String HEADERS
See Also:
Constant Field Values
Constructor Detail

HeaderManager

public HeaderManager()
Method Detail

getHeaders

public CollectionProperty getHeaders()

getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int column)

getColumnClass

public Class getColumnClass(int column)

getHeader

public Header getHeader(int row)

save

public void save(String headFile)
          throws IOException
Save the header data to a file.

Throws:
IOException

addFile

public void addFile(String headerFile)
             throws IOException
Add header data from a file.

Throws:
IOException

add

public void add(Header h)
Add a header.


add

public void add()
Add an empty header.


remove

public void remove(int index)
Remove a header.


size

public int size()
Return the number of headers.


get

public Header get(int i)
Return the header at index i.


removeHeaderNamed

public void removeHeaderNamed(String name)

split

public String[] split(String splittee,
                      String splitChar,
                      String def)
Takes a String and a tokenizer character, and returns a new array of strings of the string split by the tokenizer character.

Parameters:
splittee - string to be split
splitChar - character to split the string on
def - default value to place between two split chars that have nothing between them
Returns:
array of all the tokens.

getClassLabel

public String getClassLabel()

getSOAPHeader

public Object getSOAPHeader()
Added support for SOAP related header stuff. 1-29-04 Peter Lin

Returns:
the SOAP header Object

setSOAPHeader

public void setSOAPHeader(Object header)
Set the SOAPHeader with the SOAPHTTPConnection object. We may or may not want to rename this to setHeaderObject(Object). Concievably, other samplers may need this kind of functionality. 1-29-04 Peter Lin

Parameters:
header -

Apache JMeter
2.0.1.20050615

Copyright © 1998-2005 Apache Software Foundation. All Rights Reserved.