Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.http
Class SerializableCookie  view SerializableCookie download SerializableCookie.java

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


Field Summary
private  java.lang.String comment
           
private  java.lang.String domain
           
private  int maxAge
           
private  java.lang.String name
           
private  java.lang.String path
           
private  boolean secure
           
private  java.lang.String value
           
private  int version
           
 
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
 

Field Detail

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
Constructor Detail

SerializableCookie

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

Method Detail

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.