|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.config.ConfigTestElement
org.apache.jmeter.protocol.http.control.CookieManager
This class provides an interface to the netscape cookies file to pass cookies along with a request.
Nested Class Summary | |
static class |
CookieManager.Test
|
Field Summary | |
static String |
CLEAR
|
static String |
COOKIES
|
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 | |
CookieManager()
|
Method Summary | |
void |
add()
Add an empty cookie. |
void |
add(Cookie c)
Add a cookie. |
void |
addCookieFromHeader(String cookieHeader,
URL url)
Parse the set-cookie header value and store the cookies for later retrieval. |
void |
addFile(String cookieFile)
Add cookie data from a file. |
void |
clear()
Remove all the cookies. |
String |
convertLongToDateFormatStr(long dateLong)
|
Cookie |
get(int i)
Return the cookie at index i. |
String |
getClassLabel()
|
boolean |
getClearEachIteration()
|
Cookie |
getCookie(int row)
|
int |
getCookieCount()
|
String |
getCookieHeaderForURL(URL url)
Find cookies applicable to the given URL and build the Cookie header from them. |
CollectionProperty |
getCookies()
|
void |
recoverRunningVersion()
Tells the test element to return to the state it was in when makeRunningVersion() was called. |
void |
remove(int index)
Remove a cookie. |
void |
removeCookieNamed(String name)
|
void |
save(String authFile)
Save the cookie data to a file. |
void |
setClearEachIteration(boolean clear)
|
void |
setRunningVersion(boolean running)
Sets the runningVersion. |
int |
size()
Return the number of cookies. |
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. |
void |
testEnded()
Called once for all threads after the end of a test |
void |
testEnded(String host)
|
void |
testIterationStart(LoopIterationEvent event)
Each time through a Thread Group's test script, an iteration event is fired. |
void |
testStarted()
Called just before the start of the test Note that not all the test variables will have been set up at this point. |
void |
testStarted(String host)
|
Methods inherited from class org.apache.jmeter.config.ConfigTestElement |
addTestElement |
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement |
addProperty, canRemove, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, removeProperty, setName, setProperty, setProperty, 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 |
public static final String CLEAR
public static final String COOKIES
Constructor Detail |
public CookieManager()
Method Detail |
public CollectionProperty getCookies()
public int getCookieCount()
public boolean getClearEachIteration()
public void setClearEachIteration(boolean clear)
public Cookie getCookie(int row)
public void save(String authFile) throws IOException
IOException
public void addFile(String cookieFile) throws IOException
IOException
public void recoverRunningVersion()
TestElement
recoverRunningVersion
in interface TestElement
recoverRunningVersion
in class AbstractTestElement
public void setRunningVersion(boolean running)
AbstractTestElement
setRunningVersion
in interface TestElement
setRunningVersion
in class AbstractTestElement
running
- the runningVersion to setpublic void add(Cookie c)
public void add()
public void clear()
clear
in interface TestElement
clear
in class AbstractTestElement
public void remove(int index)
public int size()
public Cookie get(int i)
public String convertLongToDateFormatStr(long dateLong)
public String getCookieHeaderForURL(URL url)
url
- URL of the request to which the returned header will be added.
public void addCookieFromHeader(String cookieHeader, URL url)
cookieHeader
- found after the "Set-Cookie: " in the response headerurl
- URL used in the request for the above-mentioned response.public void removeCookieNamed(String name)
public String[] split(String splittee, String splitChar, String def)
splittee
- string to be splitsplitChar
- character to split the string ondef
- default value to place between two split chars that have
nothing between them
public String getClassLabel()
public void testStarted()
TestListener
testStarted
in interface TestListener
StandardJMeterEngine.run()
public void testEnded()
TestListener
testEnded
in interface TestListener
StandardJMeterEngine.stopTest()
public void testStarted(String host)
testStarted
in interface TestListener
public void testEnded(String host)
testEnded
in interface TestListener
public void testIterationStart(LoopIterationEvent event)
TestListener
testIterationStart
in interface TestListener
event
-
|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |