public class

BasicClientCookie2

extends BasicClientCookie
implements Serializable SetCookie2
java.lang.Object
   ↳ org.apache.http.impl.cookie.BasicClientCookie
     ↳ org.apache.http.impl.cookie.BasicClientCookie2

Class Overview

Default implementation of SetCookie2.

Summary

[Expand]
Inherited Constants
From interface org.apache.http.cookie.ClientCookie
Public Constructors
BasicClientCookie2(String name, String value)
Default Constructor taking a name and a value.
Public Methods
Object clone()
String getCommentURL()
Returns null.
int[] getPorts()
Returns null.
boolean isExpired(Date date)
Returns true if this cookie has expired.
boolean isPersistent()
Returns false if the cookie should be discarded at the end of the "session"; true otherwise.
void setCommentURL(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.
void setDiscard(boolean discard)
Set the Discard attribute.
void setPorts(int[] ports)
Sets the Port attribute.
[Expand]
Inherited Methods
From class org.apache.http.impl.cookie.BasicClientCookie
From class java.lang.Object
From interface org.apache.http.cookie.ClientCookie
From interface org.apache.http.cookie.Cookie
From interface org.apache.http.cookie.SetCookie
From interface org.apache.http.cookie.SetCookie2

Public Constructors

public BasicClientCookie2 (String name, String value)

Also: HttpClient

Default Constructor taking a name and a value. The value may be null.

Parameters
name The name.
value The value.

Public Methods

public Object clone ()

Also: HttpClient

public String getCommentURL ()

Also: HttpClient

Returns null. Cookies prior to RFC2965 do not set this attribute

public int[] getPorts ()

Also: HttpClient

Returns null. Cookies prior to RFC2965 do not set this attribute

public boolean isExpired (Date date)

Also: HttpClient

Returns true if this cookie has expired.

Parameters
date Current time
Returns
  • true if the cookie has expired.

public boolean isPersistent ()

Also: HttpClient

Returns false if the cookie should be discarded at the end of the "session"; true otherwise.

Returns
  • false if the cookie should be discarded at the end of the "session"; true otherwise

public void setCommentURL (String commentURL)

Also: HttpClient

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 void setDiscard (boolean discard)

Also: HttpClient

Set the Discard attribute. Note: Discard attribute overrides Max-age.

public void setPorts (int[] ports)

Also: HttpClient

Sets the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request header.