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

net.lightbody.bmp.proxy.http.BlankCookieStore Maven / Gradle / Ivy

There is a newer version: 2.1.5
Show newest version
package net.lightbody.bmp.proxy.http;

import net.lightbody.bmp.core.har.HarCookie;
import org.apache.http.client.CookieStore;
import org.apache.http.cookie.Cookie;

import java.util.Collections;
import java.util.Date;
import java.util.List;

public class BlankCookieStore implements CookieStore {
    @Override
    public void addCookie(Cookie cookie) {
        HarCookie hc = new HarCookie();
        hc.setDomain(cookie.getDomain());
        hc.setExpires(cookie.getExpiryDate());
        hc.setName(cookie.getName());
        hc.setValue(cookie.getValue());
        hc.setPath(cookie.getPath());
        RequestInfo.get().getEntry().getResponse().getCookies().add(hc);
    }

    @Override
    public List getCookies() {
        return Collections.emptyList();
    }

    @Override
    public boolean clearExpired(Date date) {
        return false;
    }

    @Override
    public void clear() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy