All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.jmeter.protocol.http.control.ThreadSafeCookieManager Maven / Gradle / Ivy

There is a newer version: 0.12
Show newest version
package org.apache.jmeter.protocol.http.control;

import org.apache.jmeter.testelement.property.PropertyIterator;

public class ThreadSafeCookieManager extends CookieManager {


    public ThreadSafeCookieManager() {
        this(new CookieManager());
    }

    public ThreadSafeCookieManager(CookieManager manager) {
        PropertyIterator iter = manager.propertyIterator();
        while (iter.hasNext()) {
            setProperty(iter.next().clone());
        }
        setRunningVersion(manager.isRunningVersion());
        testStarted();
    }

    @Override
    public synchronized void add(Cookie c) {
        super.add(c);
    }

    @Override
    synchronized void removeMatchingCookies(Cookie newCookie) {
        super.removeMatchingCookies(newCookie);
    }

    @Override
    public Object clone() {
        return super.clone();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy