com.sun.grizzly.util.http
Class ServerCookie
java.lang.Object
com.sun.grizzly.util.http.ServerCookie
- All Implemented Interfaces:
- Serializable
public class ServerCookie
- extends Object
- implements Serializable
Server-side cookie representation.
Allows recycling and uses MessageBytes as low-level
representation ( and thus the byte-> char conversion can be delayed
until we know the charset ).
Tomcat.core uses this recyclable object to represent cookies,
and the facade will convert it to the external representation.
- See Also:
- Serialized Form
Method Summary |
static void |
appendCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure)
|
static void |
appendCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure,
boolean encode)
|
static void |
appendEncodedCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure)
|
static boolean |
checkName(String name)
|
MessageBytes |
getComment()
|
String |
getCookieHeaderName()
Return the header name to set the cookie, based on cookie
version |
static String |
getCookieHeaderName(int version)
Return the header name to set the cookie, based on cookie
version |
MessageBytes |
getDomain()
|
int |
getMaxAge()
|
MessageBytes |
getName()
|
MessageBytes |
getPath()
|
boolean |
getSecure()
|
MessageBytes |
getValue()
|
int |
getVersion()
|
static boolean |
isToken(String value)
|
static void |
maybeQuote(int version,
StringBuffer buf,
String value)
|
void |
recycle()
|
void |
setMaxAge(int expiry)
|
void |
setSecure(boolean flag)
|
void |
setVersion(int v)
|
String |
toString()
|
ServerCookie
public ServerCookie()
recycle
public void recycle()
getComment
public MessageBytes getComment()
getDomain
public MessageBytes getDomain()
setMaxAge
public void setMaxAge(int expiry)
getMaxAge
public int getMaxAge()
getPath
public MessageBytes getPath()
setSecure
public void setSecure(boolean flag)
getSecure
public boolean getSecure()
getName
public MessageBytes getName()
getValue
public MessageBytes getValue()
getVersion
public int getVersion()
setVersion
public void setVersion(int v)
toString
public String toString()
- Overrides:
toString
in class Object
isToken
public static boolean isToken(String value)
checkName
public static boolean checkName(String name)
getCookieHeaderName
public String getCookieHeaderName()
- Return the header name to set the cookie, based on cookie
version
getCookieHeaderName
public static String getCookieHeaderName(int version)
- Return the header name to set the cookie, based on cookie
version
appendCookieValue
public static void appendCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure)
appendCookieValue
public static void appendCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure,
boolean encode)
appendEncodedCookieValue
public static void appendEncodedCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure)
maybeQuote
public static void maybeQuote(int version,
StringBuffer buf,
String value)
Copyright © 2011 SUN Microsystems. All Rights Reserved.