Java Doc for Cookie2.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) 


org.apache.commons.httpclient.Cookie
   org.apache.commons.httpclient.cookie.Cookie2

Cookie2
public class Cookie2 extends Cookie (Code)

Cookie class for org.apache.commons.httpclient.cookie.RFC2965Spec cookie specification. It extends Cookie class and adds newer cookie attributes and functions required for this specification.


author:
   Samit Jain (jain.samit@gmail.com)
since:
   3.1


Field Summary
final public static  StringCOMMENT
    
final public static  StringCOMMENTURL
    
final public static  StringDISCARD
    
final public static  StringDOMAIN
    
final public static  StringMAXAGE
    
final public static  StringPATH
    
final public static  StringPORT
    
final public static  StringSECURE
    
final public static  StringVERSION
    

Constructor Summary
public  Cookie2()
     Default constructor.
public  Cookie2(String domain, String name, String value)
     Creates a cookie with the given name, value and domain attribute.
public  Cookie2(String domain, String name, String value, String path, Date expires, boolean secure)
    
public  Cookie2(String domain, String name, String value, String path, Date expires, boolean secure, int[] ports)
     Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute, secure attribute, and ports attribute.

Method Summary
public  StringgetCommentURL()
     If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.
public  int[]getPorts()
     Get the Port attribute.
public  booleanisPersistent()
     Returns false if the cookie should be discarded at the end of the "session"; true otherwise.
public  booleanisPortAttributeBlank()
    
public  booleanisPortAttributeSpecified()
    
public  booleanisVersionAttributeSpecified()
    
public  voidsetCommentURL(String commentURL)
     If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.
public  voidsetDiscard(boolean toDiscard)
     Set the Discard attribute.
public  voidsetPortAttributeBlank(boolean value)
     Indicates whether the Port attribute in Set-Cookie2 header contains no value (is of the form Port="").
public  voidsetPortAttributeSpecified(boolean value)
     Indicates whether the cookie had a port attribute specified in the Set-Cookie2 response header.
public  voidsetPorts(int[] ports)
     Set the Port attribute.
public  voidsetVersionAttributeSpecified(boolean value)
     Indicates whether the cookie had a version attribute specified in the Set-Cookie2 response header.
public  StringtoExternalForm()
     Return a textual representation of the cookie.

Field Detail
COMMENT
final public static String COMMENT(Code)



COMMENTURL
final public static String COMMENTURL(Code)



DISCARD
final public static String DISCARD(Code)



DOMAIN
final public static String DOMAIN(Code)



MAXAGE
final public static String MAXAGE(Code)



PATH
final public static String PATH(Code)



PORT
final public static String PORT(Code)



SECURE
final public static String SECURE(Code)



VERSION
final public static String VERSION(Code)




Constructor Detail
Cookie2
public Cookie2()(Code)
Default constructor. Creates a blank cookie



Cookie2
public Cookie2(String domain, String name, String value)(Code)
Creates a cookie with the given name, value and domain attribute.
Parameters:
  name - the cookie name
Parameters:
  value - the cookie value
Parameters:
  domain - the domain this cookie can be sent to



Cookie2
public Cookie2(String domain, String name, String value, String path, Date expires, boolean secure)(Code)
Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute, and secure attribute
Parameters:
  name - the cookie name
Parameters:
  value - the cookie value
Parameters:
  domain - the domain this cookie can be sent to
Parameters:
  path - the path prefix for which this cookie can be sent
Parameters:
  expires - the Date at which this cookie expires,or null if the cookie expires at the endof the session
Parameters:
  secure - if true this cookie can only be sent over secureconnections
throws:
  IllegalArgumentException - If cookie name is null or blank,cookie name contains a blank, or cookie name starts with character $



Cookie2
public Cookie2(String domain, String name, String value, String path, Date expires, boolean secure, int[] ports)(Code)
Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute, secure attribute, and ports attribute.
Parameters:
  name - the cookie name
Parameters:
  value - the cookie value
Parameters:
  domain - the domain this cookie can be sent to
Parameters:
  path - the path prefix for which this cookie can be sent
Parameters:
  expires - the Date at which this cookie expires,or null if the cookie expires at the endof the session
Parameters:
  secure - if true this cookie can only be sent over secureconnections
Parameters:
  ports - the ports for which this cookie can be sent
throws:
  IllegalArgumentException - If cookie name is null or blank,cookie name contains a blank, or cookie name starts with character $




Method Detail
getCommentURL
public String getCommentURL()(Code)
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.
See Also:   Cookie2.setCommentURL(String)



getPorts
public int[] getPorts()(Code)
Get the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request header.
See Also:   Cookie2.setPorts(int[])



isPersistent
public boolean isPersistent()(Code)
Returns false if the cookie should be discarded at the end of the "session"; true otherwise. false if the cookie should be discarded at the endof the "session"; true otherwise



isPortAttributeBlank
public boolean isPortAttributeBlank()(Code)
true if the port attribute in Set-Cookie2 headerhad no value (was of the form Port="").
See Also:   Cookie2.setPortAttributeBlank



isPortAttributeSpecified
public boolean isPortAttributeSpecified()(Code)
true if cookie port attribute was specified in theSet-Cookie2 header.
See Also:   Cookie2.setPortAttributeSpecified



isVersionAttributeSpecified
public boolean isVersionAttributeSpecified()(Code)
true if cookie version attribute was specified in theSet-Cookie2 header.
See Also:   Cookie2.setVersionAttributeSpecified



setCommentURL
public void setCommentURL(String commentURL)(Code)
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.
Parameters:
  commentURL -
See Also:   Cookie2.getCommentURL()



setDiscard
public void setDiscard(boolean toDiscard)(Code)
Set the Discard attribute. Note: Discard attribute overrides Max-age.
See Also:   Cookie2.isPersistent()



setPortAttributeBlank
public void setPortAttributeBlank(boolean value)(Code)
Indicates whether the Port attribute in Set-Cookie2 header contains no value (is of the form Port="").

This value is required for generating the Cookie request header because the specification requires that if Set-Cookie2 header contains a blank value for port attribute, the Cookie header should also contain a port attribute with no value.
Parameters:
  value - true if port attribute is specified as blank in responseheader.
See Also:   Cookie2.isPortAttributeBlank




setPortAttributeSpecified
public void setPortAttributeSpecified(boolean value)(Code)
Indicates whether the cookie had a port attribute specified in the Set-Cookie2 response header.
Parameters:
  value - true if port attribute is specified in responseheader.
See Also:   Cookie2.isPortAttributeSpecified



setPorts
public void setPorts(int[] ports)(Code)
Set the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request header.
Parameters:
  ports -
See Also:   Cookie2.getPorts()



setVersionAttributeSpecified
public void setVersionAttributeSpecified(boolean value)(Code)
Indicates whether the cookie had a version attribute specified in the Set-Cookie2 response header.
Parameters:
  value - true if version attribute is specified in responseheader.
See Also:   Cookie2.isVersionAttributeSpecified()



toExternalForm
public String toExternalForm()(Code)
Return a textual representation of the cookie. string.



Methods inherited from org.apache.commons.httpclient.Cookie
public int compare(Object o1, Object o2)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public String getComment()(Code)(Java Doc)
public String getDomain()(Code)(Java Doc)
public Date getExpiryDate()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public boolean getSecure()(Code)(Java Doc)
public int getVersion()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isDomainAttributeSpecified()(Code)(Java Doc)
public boolean isExpired()(Code)(Java Doc)
public boolean isExpired(Date now)(Code)(Java Doc)
public boolean isPathAttributeSpecified()(Code)(Java Doc)
public boolean isPersistent()(Code)(Java Doc)
public void setComment(String comment)(Code)(Java Doc)
public void setDomain(String domain)(Code)(Java Doc)
public void setDomainAttributeSpecified(boolean value)(Code)(Java Doc)
public void setExpiryDate(Date expiryDate)(Code)(Java Doc)
public void setPath(String path)(Code)(Java Doc)
public void setPathAttributeSpecified(boolean value)(Code)(Java Doc)
public void setSecure(boolean secure)(Code)(Java Doc)
public void setVersion(int version)(Code)(Java Doc)
public String toExternalForm()(Code)(Java Doc)
public String toString()(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.