shz.core.net.CookiePolicyEnum Maven / Gradle / Ivy
package shz.core.net;
import shz.core.enums.SimpleNameEnum;
import java.net.CookiePolicy;
import java.net.HttpCookie;
import java.net.URI;
public enum CookiePolicyEnum implements CookiePolicy, SimpleNameEnum {
ACCEPT_ALL {
@Override
public boolean shouldAccept(URI uri, HttpCookie cookie) {
return CookiePolicy.ACCEPT_ALL.shouldAccept(uri, cookie);
}
},
ACCEPT_NONE {
@Override
public boolean shouldAccept(URI uri, HttpCookie cookie) {
return CookiePolicy.ACCEPT_NONE.shouldAccept(uri, cookie);
}
},
ACCEPT_ORIGINAL_SERVER {
@Override
public boolean shouldAccept(URI uri, HttpCookie cookie) {
return CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, cookie);
}
},
}