KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > tomcat > tc5 > sso > SSOClusterManager


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

7 package org.jboss.web.tomcat.tc5.sso;
8
9 import org.apache.catalina.Session;
10 import org.apache.catalina.Lifecycle;
11
12 /**
13  * Provides communications support between a SingleSignOn valve and other
14  * such valves configured for the same hostname within a server cluster.
15  * <p/>
16  * Implementations of this interface must declare a public no-arguments
17  * constructor.
18  *
19  * @author Brian E. Stansberry
20  * @version $Revision: 1.4 $ $Date: 2004/09/13 00:08:30 $
21  * @see ClusteredSingleSignOn
22  */

23 public interface SSOClusterManager
24    extends Lifecycle
25 {
26
27    /**
28     * Notify the cluster of the addition of a Session to an SSO session.
29     *
30     * @param ssoId the id of the SSO session
31     * @param session the Session that has been added
32     */

33    void addSession(String JavaDoc ssoId, Session session);
34
35    /**
36     * Gets the SingleSignOn valve for which this object is handling
37     * cluster communications.
38     *
39     * @return the <code>SingleSignOn</code> valve.
40     */

41    ClusteredSingleSignOn getSingleSignOnValve();
42
43    /**
44     * Sets the SingleSignOn valve for which this object is handling
45     * cluster communications.
46     * <p><b>NOTE:</b> This method must be called before calls can be
47     * made to the other methods of this interface.
48     *
49     * @param valve a <code>SingleSignOn</code> valve.
50     */

51    void setSingleSignOnValve(ClusteredSingleSignOn valve);
52
53    /**
54     * Notifies the cluster that a single sign on session has been terminated
55     * due to a user logout.
56     *
57     * @param ssoId the id of the SSO session
58     */

59    void logout(String JavaDoc ssoId);
60
61    /**
62     * Queries the cluster for the existence of a SSO session with the given
63     * id, returning a <code>SingleSignOnEntry</code> if one is found.
64     *
65     * @param ssoId the id of the SSO session
66     * @return a <code>SingleSignOnEntry</code> created using information
67     * found on another cluster node, or <code>null</code> if no
68     * entry could be found.
69     */

70    SingleSignOnEntry lookup(String JavaDoc ssoId);
71
72    /**
73     * Notifies the cluster of the creation of a new SSO entry.
74     *
75     * @param ssoId the id of the SSO session
76     * @param authType the type of authenticator (BASIC, CLIENT-CERT, DIGEST
77     * or FORM) used to authenticate the SSO.
78     * @param username the username (if any) used for the authentication
79     * @param password the password (if any) used for the authentication
80     */

81    void register(String JavaDoc ssoId, String JavaDoc authType, String JavaDoc username,
82       String JavaDoc password);
83
84    /**
85     * Notify the cluster of the removal of a Session from an SSO session.
86     *
87     * @param ssoId the id of the SSO session
88     * @param session the Session that has been removed
89     */

90    void removeSession(String JavaDoc ssoId, Session session);
91
92    /**
93     * Notifies the cluster of an update of the security credentials
94     * associated with an SSO session.
95     *
96     * @param ssoId the id of the SSO session
97     * @param authType the type of authenticator (BASIC, CLIENT-CERT, DIGEST
98     * or FORM) used to authenticate the SSO.
99     * @param username the username (if any) used for the authentication
100     * @param password the password (if any) used for the authentication
101     */

102    void updateCredentials(String JavaDoc ssoId, String JavaDoc authType, String JavaDoc username,
103       String JavaDoc password);
104
105
106 }
107
Popular Tags