Class ConcurrentSessionScope
java.lang.Object
com.aquima.interactions.portal.model.session.concurrent.ConcurrentPortalScope
com.aquima.interactions.portal.model.session.concurrent.ConcurrentPortalMessageScope
com.aquima.interactions.portal.model.session.concurrent.ConcurrentSessionScope
- All Implemented Interfaces:
IDisposableScope
,IPortalMessageScope
,IPortalScope
,ISessionLifecycle
,ISessionScope
,Serializable
Session scope implementation that uses locking to handle concurrent method calls.
- Since:
- 8.4.3
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorDescriptionConcurrentSessionScope
(ISessionScope sessionScope, ReadWriteLock lock) Construct a concurrent session scope. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ISessionActivationContext sessionActivationContext) This method may be used for activating the objects after deserialization.void
Clears all currently pending portal messages.This functions returns the current active channel if there is a channel active, otherwise when no channel is active null is returned.This function returns the current active user for the current session.Returns the current flow state N.B.Retrieves the currently pending portal messages to process.This function returns the testPath for the current session.getType()
This method will return the scope type of the portal scope implementation.void
notifyPortalMessage
(IPortalMessage message) Notifies a portal message after the current event has been processed.void
This method may be used for preparing the objects for serialization.Retrieves and clears the currently pending portal messages to process.void
setTestPath
(String testPath) This method will set the testPath for the current session.void
This method will set the user for the current session.Methods inherited from class com.aquima.interactions.portal.model.session.concurrent.ConcurrentPortalMessageScope
clearPortalMessageAction, getMappedPortalMessages, getPortalMessageAction, setPortalMessageAction
Methods inherited from class com.aquima.interactions.portal.model.session.concurrent.ConcurrentPortalScope
clearAttribute, destroyDisposableObjects, getAttribute, getAttributeNames, hasAttribute, setAttribute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.portal.IDisposableScope
destroyDisposableObjects
Methods inherited from interface com.aquima.interactions.portal.IPortalMessageScope
clearPortalMessageAction, getMappedPortalMessages, getPortalMessageAction, setPortalMessageAction
Methods inherited from interface com.aquima.interactions.portal.IPortalScope
clearAttribute, getAttribute, getAttributeNames, hasAttribute, setAttribute
-
Constructor Details
-
ConcurrentSessionScope
Construct a concurrent session scope.- Parameters:
sessionScope
- The delegate session scope, may not be null.lock
- The read/write lock to handle concurrent calls, may not be null.
-
-
Method Details
-
getCurrentFlowState
Description copied from interface:ISessionScope
Returns the current flow state N.B. We recommend one does not use this method in services and containers.- Specified by:
getCurrentFlowState
in interfaceISessionScope
- Returns:
- A flowstate
-
getActiveChannel
Description copied from interface:ISessionScope
This functions returns the current active channel if there is a channel active, otherwise when no channel is active null is returned.- Specified by:
getActiveChannel
in interfaceISessionScope
- Returns:
- The current active channel.
-
getActiveUser
Description copied from interface:ISessionScope
This function returns the current active user for the current session.- Specified by:
getActiveUser
in interfaceISessionScope
- Returns:
- The current active user, never null.
-
setUser
Description copied from interface:ISessionScope
This method will set the user for the current session. The existing user information will be discarded.- Specified by:
setUser
in interfaceISessionScope
- Parameters:
user
- The user, may not be null.
-
getTestPath
Description copied from interface:ISessionScope
This function returns the testPath for the current session.- Specified by:
getTestPath
in interfaceISessionScope
- Returns:
- The testPath for the current session
-
setTestPath
Description copied from interface:ISessionScope
This method will set the testPath for the current session. The existing testPath will be discarded.- Specified by:
setTestPath
in interfaceISessionScope
- Parameters:
testPath
- The testpath, may be null.
-
notifyPortalMessage
Description copied from interface:ISessionScope
Notifies a portal message after the current event has been processed.- Specified by:
notifyPortalMessage
in interfaceISessionScope
- Parameters:
message
- The portalmessage, not null.
-
getPendingPortalMessages
Description copied from interface:ISessionScope
Retrieves the currently pending portal messages to process.- Specified by:
getPendingPortalMessages
in interfaceISessionScope
- Returns:
- The portalmessages, not null.
-
clearPendingPortalMessages
public void clearPendingPortalMessages()Description copied from interface:ISessionScope
Clears all currently pending portal messages.- Specified by:
clearPendingPortalMessages
in interfaceISessionScope
-
removePendingPortalMessages
Description copied from interface:ISessionScope
Retrieves and clears the currently pending portal messages to process.- Specified by:
removePendingPortalMessages
in interfaceISessionScope
- Returns:
- The portal messages, not null.
-
getType
Description copied from interface:IPortalScope
This method will return the scope type of the portal scope implementation.- Specified by:
getType
in interfaceIPortalScope
- Returns:
- The current scope type.
-
activate
Description copied from interface:ISessionLifecycle
This method may be used for activating the objects after deserialization.- Specified by:
activate
in interfaceISessionLifecycle
- Parameters:
sessionActivationContext
- the current session activation context.
-
passivate
public void passivate()Description copied from interface:ISessionLifecycle
This method may be used for preparing the objects for serialization.- Specified by:
passivate
in interfaceISessionLifecycle
-