KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ha > httpsession > interfaces > SerializableHttpSession


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.ha.httpsession.interfaces;
9
10 /**
11  * Tag interface to make HttpSession serializable. Used to store the clustered HttpSession
12  * in an entity bean.
13  * Furthermore, it adds an areAttributesModified method used by the entity bean
14  * to determine if the content attributes have been modified.
15  * WARNING: the areAttributesModified method should not compare the creation and last
16  * access time but only the attributes and other specific values. Otherwise
17  * the state will be considered as changed for every request (which will cause
18  * to much cluster traffic.
19  *
20  * @see org.jboss.ha.httpsession.beanimpl.interfaces.ClusteredHttpSessionBusiness
21  *
22  * @author <a HREF="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
23  * @version $Revision: 1.3 $
24  */

25 public interface SerializableHttpSession extends java.io.Serializable JavaDoc
26 {
27    /** The serialVersionUID
28     * @since 1.2
29     */

30    static final long serialVersionUID = -4806016296187171945L;
31
32    /**
33     * Method used by the entity bean
34     * to determine if the content attributes have been modified.
35     * WARNING: the areAttributesModified method should not compare the creation and last
36     * access time but only the attributes and other specific values. Otherwise
37     * the state will be considered as changed for every request (which will cause
38     * to much cluster traffic.
39     *
40     * @param previousVersion A previous version of the HttpSession to be compared against.
41     */

42    public boolean areAttributesModified (SerializableHttpSession previousVersion);
43    
44    public long getContentCreationTime ();
45    public long getContentLastAccessTime ();
46 }
47
Popular Tags