|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.abstracthorizon.danube.http.cookie.Cookie
public class Cookie
Definition of a cookie
| Field Summary | |
|---|---|
static SimpleDateFormat |
cookieFormat
Format of the cookie date |
protected String |
domain
Cookie domain |
protected Date |
expires
Date cookie is going expire |
protected String |
name
Cookie name |
protected String |
path
Cookie path |
protected boolean |
secure
Is cookie secure |
protected String |
value
Cookie value |
| Constructor Summary | |
|---|---|
Cookie()
Creates new cookie to be sent to the browser |
|
Cookie(String header)
Creates cooke from the request headers |
|
| Method Summary | |
|---|---|
String |
getDomain()
Returns cookie's domain |
Date |
getExpires()
Returns expire date of the cookie |
String |
getName()
Returns cookie name |
String |
getPath()
Return cookie's path |
String |
getValue()
Returns cookie value |
boolean |
isSecure()
Returns is cookie is secured |
protected void |
parseCookie(String header)
Parses cookie definition (in format <name>=<value>) and stores name and value to this cookie. |
void |
setDomain(String domain)
Sets cookie's domain |
void |
setExpires(Date expires)
Sets expire date of the cookie |
void |
setName(String name)
Sets cookie name |
void |
setPath(String path)
Sets cookie's path |
void |
setSecure(boolean secure)
Sets is cookie secure |
void |
setValue(String value)
Sets cookie value |
String |
toString()
Returns cookie as string |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final SimpleDateFormat cookieFormat
protected String name
protected String value
protected Date expires
protected String domain
protected String path
protected boolean secure
| Constructor Detail |
|---|
public Cookie()
public Cookie(String header)
throws ParseException
header - request header
ParseException - thrown if "=" is missing| Method Detail |
|---|
public String getDomain()
public void setDomain(String domain)
domain - the domain to setpublic Date getExpires()
public void setExpires(Date expires)
expires - the expires to setpublic String getName()
public void setName(String name)
name - the name to setpublic String getPath()
public void setPath(String path)
path - the path to setpublic boolean isSecure()
public void setSecure(boolean secure)
secure - the secure to setpublic String getValue()
public void setValue(String value)
value - the value to setpublic String toString()
toString in class Object
protected void parseCookie(String header)
throws ParseException
header - cookie as given in a header
ParseException - thrown if "=" is missing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||