org.apache.http.impl.cookie
Class BasicClientCookie2HC4
java.lang.Object
org.apache.http.impl.cookie.BasicClientCookieHC4
org.apache.http.impl.cookie.BasicClientCookie2HC4
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, org.apache.http.cookie.ClientCookie, org.apache.http.cookie.Cookie, org.apache.http.cookie.SetCookie, org.apache.http.cookie.SetCookie2
@NotThreadSafe
public class BasicClientCookie2HC4
- extends BasicClientCookieHC4
- implements org.apache.http.cookie.SetCookie2
Default implementation of SetCookie2.
- Since:
- 4.0
- See Also:
- Serialized Form
| Fields inherited from interface org.apache.http.cookie.ClientCookie |
COMMENT_ATTR, COMMENTURL_ATTR, DISCARD_ATTR, DOMAIN_ATTR, EXPIRES_ATTR, MAX_AGE_ATTR, PATH_ATTR, PORT_ATTR, SECURE_ATTR, VERSION_ATTR |
|
Constructor Summary |
BasicClientCookie2HC4(java.lang.String name,
java.lang.String value)
Default Constructor taking a name and a value. |
|
Method Summary |
java.lang.Object |
clone()
|
java.lang.String |
getCommentURL()
Returns null. |
int[] |
getPorts()
Returns null. |
boolean |
isExpired(java.util.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(java.lang.String commentURL)
|
void |
setDiscard(boolean discard)
|
void |
setPorts(int[] ports)
|
| Methods inherited from class org.apache.http.impl.cookie.BasicClientCookieHC4 |
containsAttribute, getAttribute, getComment, getDomain, getExpiryDate, getName, getPath, getValue, getVersion, isSecure, setAttribute, setComment, setDomain, setExpiryDate, setPath, setSecure, setValue, setVersion, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.http.cookie.SetCookie |
setComment, setDomain, setExpiryDate, setPath, setSecure, setValue, setVersion |
| Methods inherited from interface org.apache.http.cookie.Cookie |
getComment, getDomain, getExpiryDate, getName, getPath, getValue, getVersion, isSecure |
BasicClientCookie2HC4
public BasicClientCookie2HC4(java.lang.String name,
java.lang.String value)
- Default Constructor taking a name and a value. The value may be null.
- Parameters:
name - The name.value - The value.
getPorts
public int[] getPorts()
- Description copied from class:
BasicClientCookieHC4
- Returns null. Cookies prior to RFC2965 do not set this attribute
- Specified by:
getPorts in interface org.apache.http.cookie.Cookie- Overrides:
getPorts in class BasicClientCookieHC4
setPorts
public void setPorts(int[] ports)
- Specified by:
setPorts in interface org.apache.http.cookie.SetCookie2
getCommentURL
public java.lang.String getCommentURL()
- Description copied from class:
BasicClientCookieHC4
- Returns null. Cookies prior to RFC2965 do not set this attribute
- Specified by:
getCommentURL in interface org.apache.http.cookie.Cookie- Overrides:
getCommentURL in class BasicClientCookieHC4
setCommentURL
public void setCommentURL(java.lang.String commentURL)
- Specified by:
setCommentURL in interface org.apache.http.cookie.SetCookie2
setDiscard
public void setDiscard(boolean discard)
- Specified by:
setDiscard in interface org.apache.http.cookie.SetCookie2
isPersistent
public boolean isPersistent()
- Description copied from class:
BasicClientCookieHC4
- Returns false if the cookie should be discarded at the end
of the "session"; true otherwise.
- Specified by:
isPersistent in interface org.apache.http.cookie.Cookie- Overrides:
isPersistent in class BasicClientCookieHC4
- Returns:
- false if the cookie should be discarded at the end
of the "session"; true otherwise
isExpired
public boolean isExpired(java.util.Date date)
- Description copied from class:
BasicClientCookieHC4
- Returns true if this cookie has expired.
- Specified by:
isExpired in interface org.apache.http.cookie.Cookie- Overrides:
isExpired in class BasicClientCookieHC4
- Parameters:
date - Current time
- Returns:
- true if the cookie has expired.
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone in class BasicClientCookieHC4
- Throws:
java.lang.CloneNotSupportedException