public interface CookiePolicy
参见RFC 2965秒。 3.3和7更详细。
Modifier and Type | Field and Description |
---|---|
static CookiePolicy |
ACCEPT_ALL
一个预定义的政策接受所有的cookies。
|
static CookiePolicy |
ACCEPT_NONE
一个预先定义的政策,不接受Cookie。
|
static CookiePolicy |
ACCEPT_ORIGINAL_SERVER
一个预先定义的政策,只接受来自原始服务器的Cookie。
|
Modifier and Type | Method and Description |
---|---|
boolean |
shouldAccept(URI uri, HttpCookie cookie)
将被调用来查看是否应该接受该cookie。
|
static final CookiePolicy ACCEPT_ALL
static final CookiePolicy ACCEPT_NONE
static final CookiePolicy ACCEPT_ORIGINAL_SERVER
boolean shouldAccept(URI uri, HttpCookie cookie)
uri
- 用于咨询接受策略的URI
cookie
- 有问题的HttpCookie对象
true
if this cookie should be accepted; otherwise,
false
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.