public class CookieParserImpl extends AbstractValueParser implements CookieParser
CookieParser是用来解析和添加HTTP请求中的cookies的接口。
注意:CookieParser永远使用ISO-8859-1编码来处理cookie的名称和值。
converter, logger, parameterKeys, parameters, webContextAGE_DELETE, AGE_SESSION| Constructor and Description |
|---|
CookieParserImpl(ParserWebContext webContext)
从request中创建新的cookies。
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getCookieDomain()
取得cookie的domain。
|
protected String |
getCookiePath()
取得cookie的path。
|
void |
removeCookie(String name)
Remove a previously set cookie from the client machine.
|
void |
setCookie(String name,
String value)
Set a cookie that will be stored on the client for the duration of the
session.
|
void |
setCookie(String name,
String value,
int seconds_age)
Set a persisten cookie on the client that will expire after a maximum age
(given in seconds).
|
add, add, add, add, add, add, add, add, add, clear, containsKey, convert, get, getBoolean, getBoolean, getByte, getByte, getBytes, getChar, getChar, getCharacterEncoding, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getInts, getInts, getKeys, getLong, getLong, getLongs, getLongs, getObject, getObject, getObjectOfType, getObjectOfType, getObjects, getObjects, getShort, getShort, getString, getString, getStrings, getStrings, getTypeConverter, getValueList, isEmpty, keySet, remove, remove, setObject, setObjects, setProperties, setString, setStrings, size, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, add, add, add, add, add, add, add, add, clear, containsKey, get, getBoolean, getBoolean, getByte, getByte, getBytes, getChar, getChar, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getInts, getInts, getKeys, getLong, getLong, getLongs, getLongs, getObject, getObject, getObjectOfType, getObjectOfType, getObjects, getObjects, getShort, getShort, getString, getString, getStrings, getStrings, getTypeConverter, isEmpty, keySet, remove, setObject, setObjects, setProperties, setString, setStrings, sizepublic CookieParserImpl(ParserWebContext webContext)
public void setCookie(String name, String value)
setCookie in interface CookieParserpublic void setCookie(String name, String value, int seconds_age)
setCookie in interface CookieParserprotected String getCookieDomain()
protected String getCookiePath()
public void removeCookie(String name)
removeCookie in interface CookieParserCopyright © 2006–2018 TinyGroup. All rights reserved.