Package com.iplanet.dpro.session
Class LegacySessionIDExtensions
- java.lang.Object
-
- com.iplanet.dpro.session.LegacySessionIDExtensions
-
- All Implemented Interfaces:
SessionIDExtensions
public class LegacySessionIDExtensions extends Object implements SessionIDExtensions
Responsible for modelling the extensions which contain information about the platform environment the SessionID was created in. A SessionID is closely tied to the Server ID and Site ID which issued the Session. This logic has been specifically encapsulated to ensure that changes to the server/site environment can be accounted for in the SessionID extensions. Therefore SessionIDExtensions will manage the Server ID, Site ID and Storage Key concepts which are used by a SessionID.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRIMARY_IDstatic StringSITE_IDstatic StringSTORAGE_KEY
-
Constructor Summary
Constructors Constructor Description LegacySessionIDExtensions()LegacySessionIDExtensions(String extensionPart)Given a SessionID encoded extension string, parse the contents and generate the extension map.LegacySessionIDExtensions(String primary, String site, String storage)LegacySessionIDExtensions(Map<String,String> extensionsMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String key, String value)Map<String,String>asMap()Stringget(String key)StringgetPrimaryID()SeeSessionID.validate()for an explanation of this value.StringgetSiteID()SeeSessionID.validate()for an explanation of this value.StringgetStorageKey()Storage key is used primarily in Internal Request Routing.StringtoString()
-
-
-
Field Detail
-
PRIMARY_ID
public static final String PRIMARY_ID
- See Also:
- Constant Field Values
-
STORAGE_KEY
public static final String STORAGE_KEY
- See Also:
- Constant Field Values
-
SITE_ID
public static final String SITE_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LegacySessionIDExtensions
public LegacySessionIDExtensions(String primary, String site, String storage)
-
LegacySessionIDExtensions
public LegacySessionIDExtensions()
-
LegacySessionIDExtensions
public LegacySessionIDExtensions(String extensionPart) throws IOException
Given a SessionID encoded extension string, parse the contents and generate the extension map. Note: Optimised alternative to DataInputStream#readUTF (which is very slow).- Parameters:
extensionPart- the encoded extension map part of SessionID.- Throws:
IOException- if there is an error decoding the extensions
-
-
Method Detail
-
getPrimaryID
public String getPrimaryID()
SeeSessionID.validate()for an explanation of this value.- Specified by:
getPrimaryIDin interfaceSessionIDExtensions- Returns:
- Possibly null Primary ID
-
getSiteID
public String getSiteID()
SeeSessionID.validate()for an explanation of this value.- Specified by:
getSiteIDin interfaceSessionIDExtensions- Returns:
- Possibly null Site ID
-
getStorageKey
public String getStorageKey()
Storage key is used primarily in Internal Request Routing.- Specified by:
getStorageKeyin interfaceSessionIDExtensions- Returns:
- Possibly null Storage Key ID
-
get
public String get(String key)
- Specified by:
getin interfaceSessionIDExtensions- Parameters:
key- Non null key- Returns:
- Value retrieved from the extensions map.
-
add
public void add(String key, String value)
- Specified by:
addin interfaceSessionIDExtensions- Parameters:
key- Key to store in extensions map.value- Value to store in extensions map.
-
asMap
public Map<String,String> asMap()
- Specified by:
asMapin interfaceSessionIDExtensions
-
-