|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.testelement.AbstractTestElement org.apache.jmeter.config.ConfigTestElement org.apache.jmeter.protocol.http.control.CookieManager
public class CookieManager
This class provides an interface to the netscape cookies file to pass cookies along with a request. Now uses Commons HttpClient parsing and matching code (since 2.1.2)
Field Summary | |
---|---|
static String |
DEFAULT_IMPLEMENTATION
|
static String |
DEFAULT_POLICY
|
Fields inherited from class org.apache.jmeter.config.ConfigTestElement |
---|
PASSWORD, USERNAME |
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
CookieManager()
|
Method Summary | |
---|---|
void |
add(Cookie c)
Add a cookie. |
void |
addCookieFromHeader(String cookieHeader,
URL url)
|
void |
addFile(String cookieFile)
Add cookie data from a file. |
void |
clear()
Clear the TestElement of all data. |
Object |
clone()
|
Cookie |
get(int i)
Return the cookie at index i. |
boolean |
getClearEachIteration()
|
int |
getCookieCount()
|
String |
getCookieHeaderForURL(URL url)
Find cookies applicable to the given URL and build the Cookie header from them. |
CollectionProperty |
getCookies()
|
String |
getImplementation()
|
String |
getPolicy()
|
void |
recoverRunningVersion()
Tells the test element to return to the state it was in when setRunningVersion(true) was called. |
void |
remove(int index)
Remove a cookie. |
void |
save(String authFile)
Save the static cookie data to a file. |
void |
setClearEachIteration(boolean clear)
|
void |
setCookiePolicy(String policy)
|
void |
setImplementation(String implementation)
|
void |
setRunningVersion(boolean running)
Sets the runningVersion. |
void |
testEnded()
Called once for all threads after the end of a test. |
void |
testEnded(String host)
Called once for all threads after the end of a test. |
void |
testIterationStart(LoopIterationEvent event)
Each time through a Thread Group's test script, an iteration event is fired for each thread. |
void |
testStarted()
Called just before the start of the test from the main engine thread. |
void |
testStarted(String host)
Called just before the start of the test from the main engine thread. |
Methods inherited from class org.apache.jmeter.config.ConfigTestElement |
---|
addConfigElement, addTestElement, expectsModification |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_POLICY
public static final String DEFAULT_IMPLEMENTATION
Constructor Detail |
---|
public CookieManager()
Method Detail |
---|
public Object clone()
clone
in interface ConfigElement
clone
in interface TestElement
clone
in class AbstractTestElement
public String getPolicy()
public void setCookiePolicy(String policy)
public CollectionProperty getCookies()
public int getCookieCount()
public boolean getClearEachIteration()
public void setClearEachIteration(boolean clear)
public String getImplementation()
public void setImplementation(String implementation)
public void save(String authFile) throws IOException
IOException
public void addFile(String cookieFile) throws IOException
IOException
public void recoverRunningVersion()
recoverRunningVersion
in interface TestElement
recoverRunningVersion
in class AbstractTestElement
public void setRunningVersion(boolean running)
setRunningVersion
in interface TestElement
setRunningVersion
in class AbstractTestElement
running
- the runningVersion to setpublic void add(Cookie c)
public void clear()
clear
in interface TestElement
clear
in class AbstractTestElement
public void remove(int index)
public Cookie get(int i)
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)
public void testStarted()
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
StandardJMeterEngine.run()
public void testEnded()
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
StandardJMeterEngine.stopTest()
public void testStarted(String host)
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
host
- name of hostStandardJMeterEngine.run()
public void testEnded(String host)
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
host
- name of hostStandardJMeterEngine.stopTest()
public void testIterationStart(LoopIterationEvent event)
testIterationStart
in interface TestIterationListener
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |