This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.net
interface CookiePolicy


public interface CookiePolicy

CookiePolicy implementations decide which cookies should be accepted and which should be rejected. Three pre-defined policy implementations are provided, namely ACCEPT_ALL, ACCEPT_NONE and ACCEPT_ORIGINAL_SERVER.

See RFC 2965 sec. 3.3 & 7 for more detail.

See Also (auto-generated):

URL

InputStream

File


Field Summary
static CookiePolicy ACCEPT_ALL
          One pre-defined policy which accepts all cookies.
static CookiePolicy ACCEPT_NONE
          One pre-defined policy which accepts no cookies.
static CookiePolicy ACCEPT_ORIGINAL_SERVER
          One pre-defined policy which only accepts cookies from original server.
 
Method Summary
 boolean
shouldAccept(URI uri, HttpCookie cookie)

          Will be called to see whether or not this cookie should be accepted.
 

Field Detail

ACCEPT_ALL

public static final CookiePolicy ACCEPT_ALL
One pre-defined policy which accepts all cookies.

ACCEPT_NONE

public static final CookiePolicy ACCEPT_NONE
One pre-defined policy which accepts no cookies.

ACCEPT_ORIGINAL_SERVER

public static final CookiePolicy ACCEPT_ORIGINAL_SERVER
One pre-defined policy which only accepts cookies from original server.
Method Detail

shouldAccept

public boolean shouldAccept(URI uri,
                            HttpCookie cookie)
Will be called to see whether or not this cookie should be accepted.

Parameters:
uri - the URI to consult accept policy with
cookie - the HttpCookie object in question
Returns:
true if this cookie should be accepted; otherwise, false


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.