Package org.apache.tomcat.util.http
Class ServerCookie
- java.lang.Object
-
- org.apache.tomcat.util.http.ServerCookie
-
- All Implemented Interfaces:
java.io.Serializable
public class ServerCookie extends java.lang.Object implements java.io.SerializableServer-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
-
-
Constructor Summary
Constructors Constructor Description ServerCookie()Creates a new empty ServerCookie instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageBytesgetName()Returns the name of this cookie as aMessageBytesobject.MessageBytesgetValue()Returns the value of this cookie as aMessageBytesobject.voidrecycle()Resets this cookie's name and value so it can be reused.java.lang.StringtoString()
-
-
-
Method Detail
-
recycle
public void recycle()
Resets this cookie's name and value so it can be reused.
-
getName
public MessageBytes getName()
Returns the name of this cookie as aMessageBytesobject.- Returns:
- the cookie name
-
getValue
public MessageBytes getValue()
Returns the value of this cookie as aMessageBytesobject.- Returns:
- the cookie value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-