Java Doc for CookiePolicy.java in  » Net » Apache-common-HttpClient » org » apache » commons » httpclient » cookie » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache common HttpClient » org.apache.commons.httpclient.cookie 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.httpclient.cookie.CookiePolicy

CookiePolicy
abstract public class CookiePolicy (Code)
Cookie management policy class. The cookie policy provides corresponding cookie management interfrace for a given type or version of cookie.

RFC 2109 specification is used per default. Other supported specification can be chosen when appropriate or set default when desired

The following specifications are provided:

  • BROWSER_COMPATIBILITY: compatible with the common cookie management practices (even if they are not 100% standards compliant)
  • NETSCAPE: Netscape cookie draft compliant
  • RFC_2109: RFC2109 compliant (default)
  • IGNORE_COOKIES: do not automcatically process cookies

author:
   Oleg Kalnichevski
author:
   Mike Bowler
since:
   2.0


Field Summary
final public static  StringBROWSER_COMPATIBILITY
     The policy that provides high degree of compatibilty with common cookie management of popular HTTP agents.
final public static  intCOMPATIBILITY
     The COMPATIBILITY policy provides high compatibilty with common cookie management of popular HTTP agents.
final public static  StringDEFAULT
     The default cookie policy.
final public static  StringIGNORE_COOKIES
     The policy that ignores cookies.
final protected static  LogLOG
     Log object.
final public static  StringNETSCAPE
     The Netscape cookie draft compliant policy.
final public static  intNETSCAPE_DRAFT
     The NETSCAPE_DRAFT Netscape draft compliant policy.
final public static  intRFC2109
     The RFC2109 RFC 2109 compliant policy.
final public static  intRFC2965
     The RFC2965 RFC 2965 compliant policy.
final public static  StringRFC_2109
     The RFC 2109 compliant policy.
final public static  StringRFC_2965
     The RFC 2965 compliant policy.


Method Summary
public static  CookieSpecgetCompatibilitySpec()
    
public static  CookieSpecgetCookieSpec(String id)
     Gets the CookieSpec cookie specification with the given ID.
public static  intgetDefaultPolicy()
    
public static  CookieSpecgetDefaultSpec()
     Returns CookieSpec cookie specification registered as CookiePolicy.DEFAULT .
public static  String[]getRegisteredCookieSpecs()
     Obtains the currently registered cookie policy names.
public static  CookieSpecgetSpecByPolicy(int policy)
    
public static  CookieSpecgetSpecByVersion(int ver)
     Gets the CookieSpec for a particular cookie version.
public static  voidregisterCookieSpec(String id, Class clazz)
     Registers a new CookieSpec cookie specification with the given identifier.
public static  voidsetDefaultPolicy(int policy)
    
public static  voidunregisterCookieSpec(String id)
     Unregisters the CookieSpec cookie specification with the given ID.

Field Detail
BROWSER_COMPATIBILITY
final public static String BROWSER_COMPATIBILITY(Code)
The policy that provides high degree of compatibilty with common cookie management of popular HTTP agents.
since:
   3.0



COMPATIBILITY
final public static int COMPATIBILITY(Code)
The COMPATIBILITY policy provides high compatibilty with common cookie management of popular HTTP agents. CookiePolicy.BROWSER_COMPATIBILITY



DEFAULT
final public static String DEFAULT(Code)
The default cookie policy.
since:
   3.0



IGNORE_COOKIES
final public static String IGNORE_COOKIES(Code)
The policy that ignores cookies.
since:
   3.0



LOG
final protected static Log LOG(Code)
Log object.



NETSCAPE
final public static String NETSCAPE(Code)
The Netscape cookie draft compliant policy.
since:
   3.0



NETSCAPE_DRAFT
final public static int NETSCAPE_DRAFT(Code)
The NETSCAPE_DRAFT Netscape draft compliant policy. CookiePolicy.NETSCAPE



RFC2109
final public static int RFC2109(Code)
The RFC2109 RFC 2109 compliant policy. CookiePolicy.RFC_2109



RFC2965
final public static int RFC2965(Code)
The RFC2965 RFC 2965 compliant policy. CookiePolicy.RFC_2965



RFC_2109
final public static String RFC_2109(Code)
The RFC 2109 compliant policy.
since:
   3.0



RFC_2965
final public static String RFC_2965(Code)
The RFC 2965 compliant policy.
since:
   3.0





Method Detail
getCompatibilitySpec
public static CookieSpec getCompatibilitySpec()(Code)
cookie specification interface that provides high compatibilty with common cookie management of popular HTTP agentsCookiePolicy.getCookieSpec(String)



getCookieSpec
public static CookieSpec getCookieSpec(String id) throws IllegalStateException(Code)
Gets the CookieSpec cookie specification with the given ID.
Parameters:
  id - the CookieSpec cookie specification ID CookieSpec cookie specification
throws:
  IllegalStateException - if a policy with the ID cannot be found
since:
   3.0



getDefaultPolicy
public static int getDefaultPolicy()(Code)
default cookie policyCookiePolicy.getDefaultSpec()
See Also:   CookiePolicy.getDefaultSpec()



getDefaultSpec
public static CookieSpec getDefaultSpec()(Code)
Returns CookieSpec cookie specification registered as CookiePolicy.DEFAULT . If no default CookieSpec cookie specification has been registered, RFC2109Spec RFC2109 specification is returned. default CookieSpec cookie specification
See Also:   CookiePolicy.DEFAULT



getRegisteredCookieSpecs
public static String[] getRegisteredCookieSpecs()(Code)
Obtains the currently registered cookie policy names. Note that the DEFAULT policy (if present) is likely to be the same as one of the other policies, but does not have to be. array of registered cookie policy names
since:
   3.1



getSpecByPolicy
public static CookieSpec getSpecByPolicy(int policy)(Code)

Parameters:
  policy - cookie policy to get the CookieSpec for cookie specification interface for the given policyCookiePolicy.getCookieSpec(String)



getSpecByVersion
public static CookieSpec getSpecByVersion(int ver)(Code)
Gets the CookieSpec for a particular cookie version.

Supported versions:

  • version 0 corresponds to the Netscape draft
  • version 1 corresponds to the RFC 2109
  • Any other cookie value coresponds to the default spec

      Parameters:
        ver - the cookie version to get the spec for cookie specification interface intended for processing cookies with the given versionCookiePolicy.getCookieSpec(String)



registerCookieSpec
public static void registerCookieSpec(String id, Class clazz)(Code)
Registers a new CookieSpec cookie specification with the given identifier. If a specification with the given ID already exists it will be overridden. This ID is the same one used to retrieve the CookieSpec cookie specification from CookiePolicy.getCookieSpec(String) .
Parameters:
  id - the identifier for this specification
Parameters:
  clazz - the CookieSpec cookie specification class to register
See Also:   CookiePolicy.getCookieSpec(String)
since:
   3.0



setDefaultPolicy
public static void setDefaultPolicy(int policy)(Code)

Parameters:
  policy - new default cookie policyCookiePolicy.registerCookieSpec(StringClass)
See Also:   CookiePolicy.DEFAULT
See Also:   



unregisterCookieSpec
public static void unregisterCookieSpec(String id)(Code)
Unregisters the CookieSpec cookie specification with the given ID.
Parameters:
  id - the ID of the CookieSpec cookie specification to unregister
since:
   3.0



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.