Package com.iplanet.dpro.session.service
Class SessionServiceConfig
- java.lang.Object
-
- com.iplanet.dpro.session.service.SessionServiceConfig
-
@Singleton public class SessionServiceConfig extends Object
Responsible for collating System Properties and amSession.xml configuration state relating to the Session Service.- Since:
- 13.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringAM_SESSION_SERVICE_NAME
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(ConfigListener listener)Register a listener to be notified whenSessionServiceConfigchanges.longgetApplicationMaxCachingTime()Returns value of SystemProperty "com.sun.identity.session.application.maxCacheTime" (minutes).StringgetConstraintHandler()Returns amSession.xml property "iplanet-am-session-constraint-handler".StringgetHttpSessionOwnerListPropertyName()StringgetHttpSessionPropertyName()StringgetHttpSessionTrackingCookieName()Returns the name of the cookie/URL parameter used by J2EE container for session tracking (currently hardcoded to "JSESSIONID")JwtSessionMappergetJwtSessionMapper()intgetMaxSessionCacheSize()The maximum number of sessions to cache in the internal session cache.longgetMaxSessionCacheTime()The maximum time of cache for internal session in the internal session cache.intgetMaxSessionListSize()Returns value of amSession.xml property "iplanet-am-session-max-session-list-size".intgetNotificationThreadPoolSize()Returns value of SystemProperty "com.iplanet.am.notification.threadpool.size".intgetNotificationThreadPoolThreshold()Returns value of SystemProperty "com.iplanet.am.notification.threadpool.threshold".StringgetSecurityCookieName()intgetSessionBlacklistCacheSize()Maximum number of blacklisted sessions to cache in memory on each server.longgetSessionBlacklistPollInterval(TimeUnit unit)The interval at which to poll for changes to the session blacklist.longgetSessionBlacklistPurgeDelay(TimeUnit unit)Amount of time to keep sessions in the blacklist beyond their expiry time to account for clock skew.longgetSessionFailoverClusterStateCheckPeriod()Returns value of amSession.xml property "com.iplanet.am.session.failover.cluster.stateCheck.period" (milliseconds).intgetSessionFailoverClusterStateCheckTimeout()Returns value of amSession.xml property "com.iplanet.am.session.failover.cluster.stateCheck.timeout" (milliseconds).longgetSessionRetrievalTimeout()Returns value of amSession.xml property "iplanet-am-session-session-list-retrieval-timeout" (seconds).Set<String>getTimeoutHandlers()Returns values of amSession.xml property "openam-session-timeout-handler-list".booleanisCookieEncodingEnabled()Returns true if SystemProperty "com.iplanet.am.cookie.encode" is true.booleanisDenyLoginIfDBIsDown()Returns true if amSession.xml property "iplanet-am-session-deny-login-if-db-is-down" is "YES" (case insensitive).booleanisLoggingEnabled()Returns true if SystemProperty "com.iplanet.am.logstatus" is "ACTIVE" (case insensitive).booleanisReturnAppSessionEnabled()Returns value of SystemProperty "com.sun.identity.session.returnAppSession".booleanisSendPropertyNotification(String key)Returns true if property change notifications are enabled for the specified property.booleanisSessionBlacklistingEnabled()Whether session blacklisting is enabled for stateless session logout.booleanisSessionConstraintEnabled()Returns true if amSession.xml property "iplanet-am-session-enable-session-constraint" is "ON" (case insensitive).
-
-
-
Field Detail
-
AM_SESSION_SERVICE_NAME
public static final String AM_SESSION_SERVICE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConstraintHandler
public String getConstraintHandler()
Returns amSession.xml property "iplanet-am-session-constraint-handler". This should be the fully qualified name of a class implementingQuotaExhaustionAction. Defaults toDestroyOldestAction.- See Also:
QuotaExhaustionAction,DestroyOldestAction
-
isDenyLoginIfDBIsDown
public boolean isDenyLoginIfDBIsDown()
Returns true if amSession.xml property "iplanet-am-session-deny-login-if-db-is-down" is "YES" (case insensitive). Defaults to false.
-
isSessionConstraintEnabled
public boolean isSessionConstraintEnabled()
Returns true if amSession.xml property "iplanet-am-session-enable-session-constraint" is "ON" (case insensitive). Defaults to false.
-
getHttpSessionPropertyName
public String getHttpSessionPropertyName()
-
getHttpSessionOwnerListPropertyName
public String getHttpSessionOwnerListPropertyName()
-
getSecurityCookieName
public String getSecurityCookieName()
-
getMaxSessionCacheSize
public int getMaxSessionCacheSize()
The maximum number of sessions to cache in the internal session cache.- Returns:
- SystemProperty "org.forgerock.openam.session.service.access.persistence.caching.maxsize". Default 64000.
-
getMaxSessionCacheTime
public long getMaxSessionCacheTime()
The maximum time of cache for internal session in the internal session cache.- Returns:
- SystemProperty "org.openidentityplatform.openam.session.service.access.persistence.caching.maxtime". Default 60.
-
isLoggingEnabled
public boolean isLoggingEnabled()
Returns true if SystemProperty "com.iplanet.am.logstatus" is "ACTIVE" (case insensitive). Defaults to false.
-
getHttpSessionTrackingCookieName
public String getHttpSessionTrackingCookieName()
Returns the name of the cookie/URL parameter used by J2EE container for session tracking (currently hardcoded to "JSESSIONID")
-
isCookieEncodingEnabled
public boolean isCookieEncodingEnabled()
Returns true if SystemProperty "com.iplanet.am.cookie.encode" is true. Defaults to false.
-
getNotificationThreadPoolSize
public int getNotificationThreadPoolSize()
Returns value of SystemProperty "com.iplanet.am.notification.threadpool.size". Defaults to 10 if not specified.
-
getNotificationThreadPoolThreshold
public int getNotificationThreadPoolThreshold()
Returns value of SystemProperty "com.iplanet.am.notification.threadpool.threshold". Defaults to 100 if not specified.
-
isReturnAppSessionEnabled
public boolean isReturnAppSessionEnabled()
Returns value of SystemProperty "com.sun.identity.session.returnAppSession". Defaults to false.
-
getTimeoutHandlers
public Set<String> getTimeoutHandlers()
Returns values of amSession.xml property "openam-session-timeout-handler-list". Each value should be the fully qualified name of a class implementingSessionTimeoutHandler.- See Also:
SessionTimeoutHandler
-
getApplicationMaxCachingTime
public long getApplicationMaxCachingTime()
Returns value of SystemProperty "com.sun.identity.session.application.maxCacheTime" (minutes). Defaults to Long.MAX_VALUE / 60 (i.e. essentially forever).
-
getSessionRetrievalTimeout
public long getSessionRetrievalTimeout()
Returns value of amSession.xml property "iplanet-am-session-session-list-retrieval-timeout" (seconds). Defaults to 5.
-
getMaxSessionListSize
public int getMaxSessionListSize()
Returns value of amSession.xml property "iplanet-am-session-max-session-list-size". Defaults to 200.
-
isSendPropertyNotification
public boolean isSendPropertyNotification(String key)
Returns true if property change notifications are enabled for the specified property. Property change notifications are activated by setting the amSession.xml property "iplanet-am-session-property-change-notification" to "ON" (case-insensitive); defaults to false. Properties for which notifications should be sent are then specified vis the amSession.xml property "iplanet-am-session-notification-property-list"; no properties are selected by default.- Parameters:
key- Name of the property to check
-
getJwtSessionMapper
public JwtSessionMapper getJwtSessionMapper()
- Returns:
- JwtSessionMapper configured according to hot-swappable SMS settings.
-
getSessionFailoverClusterStateCheckTimeout
public int getSessionFailoverClusterStateCheckTimeout()
Returns value of amSession.xml property "com.iplanet.am.session.failover.cluster.stateCheck.timeout" (milliseconds). Defaults to 1000.
-
getSessionFailoverClusterStateCheckPeriod
public long getSessionFailoverClusterStateCheckPeriod()
Returns value of amSession.xml property "com.iplanet.am.session.failover.cluster.stateCheck.period" (milliseconds). Defaults to 1000.
-
isSessionBlacklistingEnabled
public boolean isSessionBlacklistingEnabled()
Whether session blacklisting is enabled for stateless session logout. Defaults to false.
-
getSessionBlacklistCacheSize
public int getSessionBlacklistCacheSize()
Maximum number of blacklisted sessions to cache in memory on each server. Beyond this number, sessions will be evicted from memory (but kept in the CTS) in a least-recently used (LRU) strategy. Defaults to 10000.
-
getSessionBlacklistPollInterval
public long getSessionBlacklistPollInterval(TimeUnit unit)
The interval at which to poll for changes to the session blacklist. May be 0 to indicate polling is disabled.- Parameters:
unit- the desired time unit for the poll interval.
-
getSessionBlacklistPurgeDelay
public long getSessionBlacklistPurgeDelay(TimeUnit unit)
Amount of time to keep sessions in the blacklist beyond their expiry time to account for clock skew.- Parameters:
unit- the desired time unit for the purge delay.
-
addListener
public void addListener(ConfigListener listener)
Register a listener to be notified whenSessionServiceConfigchanges.- Parameters:
listener- the event listener to call whenSessionServiceConfigchanges.
-
-