Apache JMeter

Class HC3CookieHandler

  extended by org.apache.jmeter.protocol.http.control.HC3CookieHandler
All Implemented Interfaces:

public class HC3CookieHandler
extends Object
implements CookieHandler

HTTPClient 3.1 implementation

Constructor Summary
HC3CookieHandler(String policy)
Method Summary
 void addCookieFromHeader(CookieManager cookieManager, boolean checkCookies, String cookieHeader, URL url)
          Add cookie to CookieManager from cookieHeader and URL
 String getCookieHeaderForURL(CollectionProperty cookiesCP, URL url, boolean allowVariableCookie)
          Find cookies applicable to the given URL and build the Cookie header from them.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public HC3CookieHandler(String policy)
policy - cookie policy to which to conform (see CookiePolicy.getCookieSpec(String)
Method Detail


public String getCookieHeaderForURL(CollectionProperty cookiesCP,
                                    URL url,
                                    boolean allowVariableCookie)
Find cookies applicable to the given URL and build the Cookie header from them.

Specified by:
getCookieHeaderForURL in interface CookieHandler
url - URL of the request to which the returned header will be added.
cookiesCP - CollectionProperty of Cookie
allowVariableCookie - flag whether to allow jmeter variables in cookie values
the value string for the cookie header (goes after "Cookie: ").


public void addCookieFromHeader(CookieManager cookieManager,
                                boolean checkCookies,
                                String cookieHeader,
                                URL url)
Add cookie to CookieManager from cookieHeader and URL

Specified by:
addCookieFromHeader in interface CookieHandler
cookieManager - CookieManager on which cookies are added
checkCookies - boolean to indicate if cookies must be validated against spec
cookieHeader - String cookie Header
url - URL

Apache JMeter

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