Package com.aquima.web.sessionmanager
Class AquimaSessionsMap
java.lang.Object
com.aquima.web.sessionmanager.AquimaSessionsMap
- All Implemented Interfaces:
com.blueriq.component.api.IAquimaSessionsMap
,Serializable
,org.springframework.beans.factory.DisposableBean
public class AquimaSessionsMap
extends Object
implements com.blueriq.component.api.IAquimaSessionsMap, Serializable, org.springframework.beans.factory.DisposableBean
This session manager implementation is a session scoped Spring bean.
- Author:
- Danny Roest, Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAquimaSessionsMap
(long timeout, TimeUnit unit) Creates a new instance without a work unit executor.AquimaSessionsMap
(com.blueriq.component.api.workunit.IWorkUnitExecutor executor, long timeout, TimeUnit unit) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildSession
(String parentSessionId, com.blueriq.component.api.IAquimaSession childSession) void
addSession
(com.blueriq.component.api.IAquimaSession aquimaSession) Adds the webPortalSession to the httpSession and creates a new unique id for this session.void
void
closeSession
(String aquimaSessionId) void
destroy()
void
flush()
List
<com.blueriq.component.api.IAquimaSession> getChildSessions
(String sessionId) List
<com.blueriq.component.api.IAquimaSession> getChildSessions
(String sessionId, String pageName) com.blueriq.component.api.IAquimaSession
getRootSession
(String sessionId) com.blueriq.component.api.IAquimaSession
getSession
(String aquimaSessionId) Returns the the webPortalSession belonging to the session id in the request.com.blueriq.component.api.IAquimaSession
getSession
(String aquimaSessionId, com.blueriq.component.api.FlushMode flushMode) long
boolean
hasSession
(String sessionId) boolean
isSessionCircularDependent
(String sessionId, String childSessionId, String pageName) This method checks if a session contains itself through its children.void
void
updateSession
(com.blueriq.component.api.IAquimaSession aquimaSession)
-
Constructor Details
-
AquimaSessionsMap
Creates a new instance without a work unit executor.- Parameters:
timeout
- the session timeoutunit
- the units for the session timeout
-
AquimaSessionsMap
public AquimaSessionsMap(com.blueriq.component.api.workunit.IWorkUnitExecutor executor, long timeout, TimeUnit unit) Creates a new instance. The optional executor will be used to close sessions within a transaction.- Parameters:
executor
- the optional work unit executor, may benull
timeout
- the session timeoutunit
- the units for the session timeout
-
-
Method Details
-
getSessionTimeoutMillis
public long getSessionTimeoutMillis()- Specified by:
getSessionTimeoutMillis
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
addSession
public void addSession(com.blueriq.component.api.IAquimaSession aquimaSession) Adds the webPortalSession to the httpSession and creates a new unique id for this session.- Specified by:
addSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
- Parameters:
aquimaSession
- the webPortalSession to put on the http session
-
addChildSession
public void addChildSession(String parentSessionId, com.blueriq.component.api.IAquimaSession childSession) - Specified by:
addChildSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
hasSession
- Specified by:
hasSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
closeSession
- Specified by:
closeSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
cleanIdleSessions
public void cleanIdleSessions()- Specified by:
cleanIdleSessions
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
keepAlive
- Specified by:
keepAlive
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
getSession
Returns the the webPortalSession belonging to the session id in the request.Throws an IllegalStateException when there is no web portal session found for the session id in the request
- Specified by:
getSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
- Parameters:
aquimaSessionId
- The requested aquima session id- Returns:
- the webPortalSession belonging to the session id in the request.
-
getSession
public com.blueriq.component.api.IAquimaSession getSession(String aquimaSessionId, com.blueriq.component.api.FlushMode flushMode) - Specified by:
getSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
getAvailableSessionIds
- Specified by:
getAvailableSessionIds
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
getMainSessionIds
- Specified by:
getMainSessionIds
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
updateSession
public void updateSession(com.blueriq.component.api.IAquimaSession aquimaSession) - Specified by:
updateSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
flush
public void flush()- Specified by:
flush
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
getChildSessions
- Specified by:
getChildSessions
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
getChildSessions
public List<com.blueriq.component.api.IAquimaSession> getChildSessions(String sessionId, String pageName) - Specified by:
getChildSessions
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
getRootSession
- Specified by:
getRootSession
in interfacecom.blueriq.component.api.IAquimaSessionsMap
-
isSessionCircularDependent
This method checks if a session contains itself through its children.- Parameters:
sessionId
- The session Id for the current checked sessionchildSessionId
- The session Id of a child session of the current checked sessionpageName
- the page name- Returns:
- false, if session does not contain itself through its children. true, if session contains itself through its children.
-