KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.web.tomcat.tc6.session;
23
24 import javax.servlet.http.HttpServletResponse JavaDoc;
25
26 import org.apache.catalina.Session;
27 import org.apache.catalina.Manager;
28 import org.jboss.metadata.WebMetaData;
29
30 /** Common interface for the http session replication managers.
31  *
32  * @author Scott.Stark@jboss.org
33  * @version $Revision: 58583 $
34  */

35 public interface AbstractJBossManager extends Manager
36 {
37    /** Initialize the manager with the web metadata and
38     * @param name
39     * @param webMetaData
40     * @param useJK
41     * @param useLocalCache
42     * @throws ClusteringNotSupportedException
43     */

44    public void init(String JavaDoc name, WebMetaData webMetaData, boolean useJK,
45       boolean useLocalCache)
46       throws ClusteringNotSupportedException;
47
48    /** The session invalidation policy.
49     * @return the invalidation policy constant
50     */

51    public InvalidateSessionPolicy getInvalidateSessionPolicy();
52
53    /**
54     * Retrieve the JvmRoute for the enclosing Engine.
55     *
56     * @return the JvmRoute or null.
57     */

58    public String JavaDoc getJvmRoute();
59
60    /**
61     * Sets a new cookie for the given session id and response
62     *
63     * @param sessionId The session id
64     */

65    public void setNewSessionCookie(String JavaDoc sessionId, HttpServletResponse JavaDoc response);
66
67    /**
68     * Remove the active session locally from the manager without replicating to the cluster. This can be
69     * useful when the session is exipred, for example, where there is not need to propagate the expiration.
70     *
71     * @param session
72     */

73    public void removeLocal(Session session);
74
75    /**
76     * Store the modified session.
77     *
78     * @param session
79     */

80    public boolean storeSession(Session session);
81 }
82
Popular Tags