EAF 7.6 Implementation

com.lutris.http
Class SerializableCookie

java.lang.Object
  extended by 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.

See Also:
Cookie, com.lutris.servlet.connectionMethod.RMIConnectionMethodImpl, com.lutris.servlet.rmi.http.RMIHttpServletRequestImpl, com.lutris.servlet.rmi.http.RMIHttpServletResponseImpl, Serialized Form

Constructor Summary
SerializableCookie(javax.servlet.http.Cookie cookie)
          Constructor.
 
Method Summary
 javax.servlet.http.Cookie getCookie()
          Recreate the cookie that was passed into the constructor.
 java.lang.String toString()
          Returns a multi-line description of the data stored about the cookie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializableCookie

public SerializableCookie(javax.servlet.http.Cookie cookie)
Constructor. Saves all the data about the Cookie, so it can be reconstructed later.

Parameters:
cookie - The cookie to make a copy of.
Method Detail

getCookie

public javax.servlet.http.Cookie getCookie()
Recreate the cookie that was passed into the constructor.

Returns:
A Cookie just like the one 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.

Overrides:
toString in class java.lang.Object
Returns:
A string description of the cookie.

EAF 7.6 Implementation