Java Doc for CookieSpec.java in  » Web-Crawler » heritrix » 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 » Web Crawler » heritrix » org.apache.commons.httpclient.cookie 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.httpclient.cookie.CookieSpec

All known Subclasses:   org.apache.commons.httpclient.cookie.IgnoreCookiesSpec,  org.apache.commons.httpclient.cookie.CookieSpecBase,
CookieSpec
public interface CookieSpec (Code)
Defines the cookie management specification.

Cookie management specification must define

  • rules of parsing "Set-Cookie" header
  • rules of validation of parsed cookies
  • formatting of "Cookie" header
for a given host, port and path of origin
author:
   Oleg Kalnichevski
author:
   Jeff Dever
since:
   2.0


Field Summary
final static  StringPATH_DELIM
    
final static  charPATH_DELIM_CHAR
    


Method Summary
 booleandomainMatch(String host, String domain)
     Performs domain-match as defined by the cookie specification.
Parameters:
  host - The target host.
Parameters:
  domain - The cookie domain attribute.
 StringformatCookie(Cookie cookie)
     Create a "Cookie" header value for an array of cookies.
 HeaderformatCookieHeader(Cookie[] cookies)
     Create a "Cookie" Header for an array of Cookies.
 HeaderformatCookieHeader(Cookie cookie)
     Create a "Cookie" Header for single Cookie.
 StringformatCookies(Cookie[] cookies)
     Create a "Cookie" header value for an array of cookies.
 CollectiongetValidDateFormats()
     Returns the Collection of date patterns used for parsing.
 booleanmatch(String host, int port, String path, boolean secure, Cookie cookie)
     Determines if a Cookie matches a location.
 Cookie[]match(String host, int port, String path, boolean secure, Cookie cookies)
     Determines which of an array of Cookies matches a location.
 Cookie[]match(String domain, int port, String path, boolean secure, SortedMap cookiesMap)
     Determines which of an array of Cookies matches a location. If the SortedMap comes from an HttpState and is not itself thread-safe, it may be necessary to synchronize on the HttpState instance to protect against concurrent modification.
 Cookie[]parse(String host, int port, String path, boolean secure, String header)
     Parse the "Set-Cookie" header value into Cookie array.
 Cookie[]parse(String host, int port, String path, boolean secure, Header header)
     Parse the "Set-Cookie" Header into an array of Cookies.
 voidparseAttribute(NameValuePair attribute, Cookie cookie)
     Parse the cookie attribute and update the corresponsing Cookie properties.
 booleanpathMatch(String path, String topmostPath)
     Performs path-match as defined by the cookie specification.
Parameters:
  path - The target path.
Parameters:
  topmostPath - The cookie path attribute.
 voidsetValidDateFormats(Collection datepatterns)
     Sets the Collection of date patterns used for parsing.
 voidvalidate(String host, int port, String path, boolean secure, Cookie cookie)
     Validate the cookie according to validation rules defined by the cookie specification.

Field Detail
PATH_DELIM
final static String PATH_DELIM(Code)
Path delimiter



PATH_DELIM_CHAR
final static char PATH_DELIM_CHAR(Code)
Path delimiting charachter





Method Detail
domainMatch
boolean domainMatch(String host, String domain)(Code)
Performs domain-match as defined by the cookie specification.
Parameters:
  host - The target host.
Parameters:
  domain - The cookie domain attribute. true if the specified host matches the given domain.
since:
   3.0



formatCookie
String formatCookie(Cookie cookie)(Code)
Create a "Cookie" header value for an array of cookies.
Parameters:
  cookie - the cookie to be formatted as string a string suitable for sending in a "Cookie" header.



formatCookieHeader
Header formatCookieHeader(Cookie[] cookies) throws IllegalArgumentException(Code)
Create a "Cookie" Header for an array of Cookies.
Parameters:
  cookies - the Cookies format into a Cookie header a Header for the given Cookies.
throws:
  IllegalArgumentException - if an input parameter is illegal



formatCookieHeader
Header formatCookieHeader(Cookie cookie) throws IllegalArgumentException(Code)
Create a "Cookie" Header for single Cookie.
Parameters:
  cookie - the Cookie format as a Cookie header a Cookie header.
throws:
  IllegalArgumentException - if an input parameter is illegal



formatCookies
String formatCookies(Cookie[] cookies) throws IllegalArgumentException(Code)
Create a "Cookie" header value for an array of cookies.
Parameters:
  cookies - the Cookies to be formatted a string suitable for sending in a Cookie header.
throws:
  IllegalArgumentException - if an input parameter is illegal



getValidDateFormats
Collection getValidDateFormats()(Code)
Returns the Collection of date patterns used for parsing. The String patterns are compatible with the java.text.SimpleDateFormat . collection of date patterns



match
boolean match(String host, int port, String path, boolean secure, Cookie cookie)(Code)
Determines if a Cookie matches a location.
Parameters:
  host - the host to which the request is being submitted
Parameters:
  port - the port to which the request is being submitted
Parameters:
  path - the path to which the request is being submitted
Parameters:
  secure - true if the request is using a secure connection
Parameters:
  cookie - the Cookie to be matched true if the cookie should be submitted with a request with given attributes, false otherwise.



match
Cookie[] match(String host, int port, String path, boolean secure, Cookie cookies)(Code)
Determines which of an array of Cookies matches a location.
Parameters:
  host - the host to which the request is being submitted
Parameters:
  port - the port to which the request is being submitted (currenlty ignored)
Parameters:
  path - the path to which the request is being submitted
Parameters:
  secure - true if the request is using a secure protocol
Parameters:
  cookies - an array of Cookies to be matched true if the cookie should be submitted with a request with given attributes, false otherwise.// BEGIN IA CHANGES



match
Cookie[] match(String domain, int port, String path, boolean secure, SortedMap cookiesMap)(Code)
Determines which of an array of Cookies matches a location. If the SortedMap comes from an HttpState and is not itself thread-safe, it may be necessary to synchronize on the HttpState instance to protect against concurrent modification.
Parameters:
  host - the host to which the request is being submitted
Parameters:
  port - the port to which the request is being submitted (currenlty ignored)
Parameters:
  path - the path to which the request is being submitted
Parameters:
  secure - true if the request is using a secure protocol
Parameters:
  cookies - SortedMap of Cookies to be matched true if the cookie should be submitted with a request with given attributes, false otherwise.



parse
Cookie[] parse(String host, int port, String path, boolean secure, String header) throws MalformedCookieException, IllegalArgumentException(Code)
Parse the "Set-Cookie" header value into Cookie array.
Parameters:
  host - the host which sent the Set-Cookie header
Parameters:
  port - the port which sent the Set-Cookie header
Parameters:
  path - the path which sent the Set-Cookie header
Parameters:
  secure - true when the Set-Cookie header was received over secure conection
Parameters:
  header - the Set-Cookie received from the server an array of Cookies parsed from the Set-Cookie value
throws:
  MalformedCookieException - if an exception occurs during parsing
throws:
  IllegalArgumentException - if an input parameter is illegal



parse
Cookie[] parse(String host, int port, String path, boolean secure, Header header) throws MalformedCookieException, IllegalArgumentException(Code)
Parse the "Set-Cookie" Header into an array of Cookies.
Parameters:
  host - the host which sent the Set-Cookie header
Parameters:
  port - the port which sent the Set-Cookie header
Parameters:
  path - the path which sent the Set-Cookie header
Parameters:
  secure - true when the Set-Cookie header was received over secure conection
Parameters:
  header - the Set-Cookie received from the server an array of Cookies parsed from the header
throws:
  MalformedCookieException - if an exception occurs during parsing
throws:
  IllegalArgumentException - if an input parameter is illegal



parseAttribute
void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException, IllegalArgumentException(Code)
Parse the cookie attribute and update the corresponsing Cookie properties.
Parameters:
  attribute - cookie attribute from the Set-Cookie
Parameters:
  cookie - the to be updated
throws:
  MalformedCookieException - if an exception occurs during parsing
throws:
  IllegalArgumentException - if an input parameter is illegal



pathMatch
boolean pathMatch(String path, String topmostPath)(Code)
Performs path-match as defined by the cookie specification.
Parameters:
  path - The target path.
Parameters:
  topmostPath - The cookie path attribute. true if the paths match
since:
   3.0



setValidDateFormats
void setValidDateFormats(Collection datepatterns)(Code)
Sets the Collection of date patterns used for parsing. The String patterns must be compatible with java.text.SimpleDateFormat .
Parameters:
  datepatterns - collection of date patterns



validate
void validate(String host, int port, String path, boolean secure, Cookie cookie) throws MalformedCookieException, IllegalArgumentException(Code)
Validate the cookie according to validation rules defined by the cookie specification.
Parameters:
  host - the host from which the Cookie was received
Parameters:
  port - the port from which the Cookie was received
Parameters:
  path - the path from which the Cookie was received
Parameters:
  secure - true when the Cookie was received using a secure connection
Parameters:
  cookie - the Cookie to validate
throws:
  MalformedCookieException - if the cookie is invalid
throws:
  IllegalArgumentException - if an input parameter is illegal



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