1 /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package org.acegisecurity.concurrent;
17
18 /**
19 * Implemented by {@link org.acegisecurity.Authentication#getDetails()}
20 * implementations that are capable of returning a session ID.
21 *
22 * <p>
23 * This interface is used by {@link
24 * org.acegisecurity.concurrent.SessionRegistryUtils} to extract the session
25 * ID from an <code>Authentication</code> object. In turn,
26 * <code>SessionRegistryUtils</code> is used by {@link
27 * ConcurrentSessionControllerImpl}. If not using this latter implementation,
28 * you do not need the <code>Authentication.getDetails()</code> object to
29 * implement <code>SessionIdentifierAware</code>.
30 * </p>
31 *
32 * @author Ben Alex
33 * @version $Id: SessionIdentifierAware.java 1784 2007-02-24 21:00:24Z luke_t $
34 */
35 public interface SessionIdentifierAware {
36 //~ Methods ========================================================================================================
37
38 /**
39 * Obtains the session ID.
40 *
41 * @return the session ID, or <code>null</code> if not known.
42 */
43 String getSessionId();
44 }