Class HC4CookieHandler
java.lang.Object
org.apache.jmeter.protocol.http.control.HC4CookieHandler
- All Implemented Interfaces:
CookieHandler
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefault constructor that usesDEFAULT_POLICY_NAME
HC4CookieHandler
(String policy) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCookieFromHeader
(CookieManager cookieManager, boolean checkCookies, String cookieHeader, URL url) Add cookie to CookieManager from cookieHeader and URLgetCookieHeaderForURL
(CollectionProperty cookiesCP, URL url, boolean allowVariableCookie) Find cookies applicable to the given URL and build the Cookie header from them.String[]
-
Field Details
-
DEFAULT_POLICY_NAME
- See Also:
-
-
Constructor Details
-
HC4CookieHandler
public HC4CookieHandler()Default constructor that usesDEFAULT_POLICY_NAME
-
HC4CookieHandler
-
-
Method Details
-
addCookieFromHeader
public void addCookieFromHeader(CookieManager cookieManager, boolean checkCookies, String cookieHeader, URL url) Description copied from interface:CookieHandler
Add cookie to CookieManager from cookieHeader and URL- Specified by:
addCookieFromHeader
in interfaceCookieHandler
- Parameters:
cookieManager
- CookieManager on which cookies are addedcheckCookies
- boolean to indicate if cookies must be validated against speccookieHeader
- String cookie Headerurl
- URL
-
getCookieHeaderForURL
public String getCookieHeaderForURL(CollectionProperty cookiesCP, URL url, boolean allowVariableCookie) Description copied from interface:CookieHandler
Find cookies applicable to the given URL and build the Cookie header from them.- Specified by:
getCookieHeaderForURL
in interfaceCookieHandler
- Parameters:
cookiesCP
-CollectionProperty
ofCookie
url
- URL of the request to which the returned header will be added.allowVariableCookie
- flag whether to allow jmeter variables in cookie values- Returns:
- the value string for the cookie header (goes after "Cookie: ") or null if no cookie matches
-
getDefaultPolicy
- Specified by:
getDefaultPolicy
in interfaceCookieHandler
- Returns:
- Cookie default policy name
-
getPolicies
- Specified by:
getPolicies
in interfaceCookieHandler
- Returns:
- Supported cookie policies
-