|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.http.impl.cookie.BasicClientCookieHC4
@NotThreadSafe public class BasicClientCookieHC4
Default implementation of SetCookie.
| Field Summary |
|---|
| 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 | |
|---|---|
BasicClientCookieHC4(java.lang.String name,
java.lang.String value)
Default Constructor taking a name and a value. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
containsAttribute(java.lang.String name)
|
java.lang.String |
getAttribute(java.lang.String name)
|
java.lang.String |
getComment()
Returns the comment describing the purpose of this cookie, or null if no such comment has been defined. |
java.lang.String |
getCommentURL()
Returns null. |
java.lang.String |
getDomain()
Returns domain attribute of the cookie. |
java.util.Date |
getExpiryDate()
Returns the expiration Date of the cookie, or null
if none exists. |
java.lang.String |
getName()
Returns the name. |
java.lang.String |
getPath()
Returns the path attribute of the cookie |
int[] |
getPorts()
Returns null. |
java.lang.String |
getValue()
Returns the value. |
int |
getVersion()
Returns the version of the cookie specification to which this cookie conforms. |
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. |
boolean |
isSecure()
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
|
void |
setComment(java.lang.String comment)
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment. |
void |
setDomain(java.lang.String domain)
Sets the domain attribute. |
void |
setExpiryDate(java.util.Date expiryDate)
Sets expiration date. |
void |
setPath(java.lang.String path)
Sets the path attribute. |
void |
setSecure(boolean secure)
Sets the secure attribute of the cookie. |
void |
setValue(java.lang.String value)
Sets the value |
void |
setVersion(int version)
Sets the version of the cookie specification to which this cookie conforms. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicClientCookieHC4(java.lang.String name,
java.lang.String value)
name - The name.value - The value.| Method Detail |
|---|
public java.lang.String getName()
getName in interface org.apache.http.cookie.Cookiepublic java.lang.String getValue()
getValue in interface org.apache.http.cookie.Cookiepublic void setValue(java.lang.String value)
setValue in interface org.apache.http.cookie.SetCookievalue - public java.lang.String getComment()
getComment in interface org.apache.http.cookie.CookiesetComment(String)public void setComment(java.lang.String comment)
setComment in interface org.apache.http.cookie.SetCookiecomment - getComment()public java.lang.String getCommentURL()
getCommentURL in interface org.apache.http.cookie.Cookiepublic java.util.Date getExpiryDate()
Date of the cookie, or null
if none exists.
Note: the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.
getExpiryDate in interface org.apache.http.cookie.CookieDate, or null.setExpiryDate(java.util.Date)public void setExpiryDate(java.util.Date expiryDate)
Note: the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.
setExpiryDate in interface org.apache.http.cookie.SetCookieexpiryDate - the Date after which this cookie is no longer valid.getExpiryDate()public boolean isPersistent()
isPersistent in interface org.apache.http.cookie.Cookiepublic java.lang.String getDomain()
getDomain in interface org.apache.http.cookie.CookiesetDomain(java.lang.String)public void setDomain(java.lang.String domain)
setDomain in interface org.apache.http.cookie.SetCookiedomain - The value of the domain attributegetDomain()public java.lang.String getPath()
getPath in interface org.apache.http.cookie.CookiesetPath(java.lang.String)public void setPath(java.lang.String path)
setPath in interface org.apache.http.cookie.SetCookiepath - The value of the path attributegetPath()public boolean isSecure()
isSecure in interface org.apache.http.cookie.Cookietrue if this cookie should only be sent over secure connections.setSecure(boolean)public void setSecure(boolean secure)
When true the cookie should only be sent using a secure protocol (https). This should only be set when the cookie's originating server used a secure protocol to set the cookie's value.
setSecure in interface org.apache.http.cookie.SetCookiesecure - The value of the secure attributeisSecure()public int[] getPorts()
getPorts in interface org.apache.http.cookie.Cookiepublic int getVersion()
getVersion in interface org.apache.http.cookie.CookiesetVersion(int)public void setVersion(int version)
setVersion in interface org.apache.http.cookie.SetCookieversion - the version of the cookie.getVersion()public boolean isExpired(java.util.Date date)
isExpired in interface org.apache.http.cookie.Cookiedate - Current time
public void setAttribute(java.lang.String name,
java.lang.String value)
public java.lang.String getAttribute(java.lang.String name)
getAttribute in interface org.apache.http.cookie.ClientCookiepublic boolean containsAttribute(java.lang.String name)
containsAttribute in interface org.apache.http.cookie.ClientCookie
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||