java.lang.Object
com.lutris.http.SerializableCookie
- All Implemented Interfaces:
- java.io.Serializable
- public class SerializableCookie
- extends java.lang.Object
- implements java.io.Serializable
This class is a substitute for Cookies, but it is serializable.
It is used to pass cookies back and forth when using RMI.
Rather than pasing or returning a Cookie, which would cause a
marshalling error, the Cookies are turned into SerializabeCookies,
passed through RMI, then turned back into Cookies at the other end.
There is no reason why Cookies could not be serializable. Sun may well
fix this oversight in version 2 of Java, in which case this class will
no longer be necissary to use RMI with the MultiServer.
name
private java.lang.String name
value
private java.lang.String value
comment
private java.lang.String comment
domain
private java.lang.String domain
maxAge
private int maxAge
path
private java.lang.String path
secure
private boolean secure
version
private int version
SerializableCookie
public SerializableCookie(javax.servlet.http.Cookie cookie)
- Constructor. Saves all the data about the Cookie, so it can be
reconstructed later.
getCookie
public javax.servlet.http.Cookie getCookie()
- Recreate the cookie that was passed into the constructor.
toString
public java.lang.String toString()
- Returns a multi-line description of the data stored about
the cookie. Usefull for debugging.