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

com.qa.framework.library.httpclient.CookieCache Maven / Gradle / Ivy

There is a newer version: 2.5
Show newest version
package com.qa.framework.library.httpclient;

import org.apache.http.client.CookieStore;

/**
 * Created by apple on 15/11/9.
 */
public class CookieCache {
    private static ThreadLocal cookieStoreThreadLocal = new ThreadLocal();

    /**
     * Set.
     *
     * @param cookie the cookie
     */
    public static void set(CookieStore cookie) {
        cookieStoreThreadLocal.set(cookie);
    }

    /**
     * Get cookie store.
     *
     * @return the cookie store
     */
    public static CookieStore get() {
        return cookieStoreThreadLocal.get();
    }

    /**
     * Clear.
     */
    public static void clear() {
        set(null);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy