KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > tomcat > tc5 > session > AbstractJBossManager


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

7 package org.jboss.web.tomcat.tc5.session;
8
9 import javax.servlet.http.HttpServletResponse JavaDoc;
10
11 import org.apache.catalina.Session;
12 import org.apache.catalina.Manager;
13 import org.jboss.metadata.WebMetaData;
14
15 /** Common interface for the http session replication managers.
16  *
17  * @author Scott.Stark@jboss.org
18  * @version $Revision: 1.1.2.3 $
19  */

20 public interface AbstractJBossManager extends Manager
21 {
22    /** Initialize the manager with the web metadata and
23     * @param name
24     * @param webMetaData
25     * @param useJK
26     * @param useLocalCache
27     * @throws ClusteringNotSupportedException
28     */

29    public void init(String JavaDoc name, WebMetaData webMetaData, boolean useJK,
30       boolean useLocalCache)
31       throws ClusteringNotSupportedException;
32
33    /** The session invalidation policy. One of:
34     SESSION_INVALIDATE_ACCESS =0;
35     SESSION_INVALIDATE_SET_AND_GET =1;
36     SESSION_INVALIDATE_SET_AND_NON_PRIMITIVE_GET =2;
37     SESSION_INVALIDATE_SET =3;
38     * @return the invalidation policy constant
39     */

40    public int getInvalidateSessionPolicy();
41
42    /**
43     * Retrieve the JvmRoute for the enclosing Engine.
44     *
45     * @return the JvmRoute or null.
46     */

47    public String JavaDoc getJvmRoute();
48
49    /**
50     * Sets a new cookie for the given session id and response
51     *
52     * @param sessionId The session id
53     */

54    public void setNewSessionCookie(String JavaDoc sessionId, HttpServletResponse JavaDoc response);
55
56    /**
57     * Remove the active session locally from the manager without replicating to the cluster. This can be
58     * useful when the session is exipred, for example, where there is not need to propagate the expiration.
59     *
60     * @param session
61     */

62    public void removeLocal(Session session);
63
64    /**
65     * Store the modified session.
66     *
67     * @param session
68     */

69    public boolean storeSession(Session session);
70 }
71
Popular Tags