Package com.microstrategy.web.objects
Interface WebSessionInfoList
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
- All Known Subinterfaces:
WebIServerSessionList
public interface WebSessionInfoList extends Persistable
The WebSessionInfoList interface represents a list of WebSessionInfo objects. The list is ordered, and has an active session at all times. The active session is the session which will be used by the rest of the Web Objects to send requests to the Intelligence Server. Note that saveState on the WebSessionInfoList will save the state of the list and all sessions within the list. RestoreState will restore the list state, but in addition, it can accept the session state, in which case the restoreState will cause the list to contain a single session corresponding to the state passed to it.- Since:
- MicroStrategy Web 8.0.1
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebSessionInfo
get(int i)
Obtains the session in the list at the given index.WebSessionInfo
getActiveSession()
Returns the currently active session.WebObjectsFactory
getFactory()
Returns the ownerWebObjectsFactory
object.void
remove(WebSessionInfo session)
Removes the given session from the collection, closing the session on the object if one exists.void
remove(WebSessionInfo session, boolean closeSession)
Removes the given session from the collection.void
removeAll()
Removes all sessions from the collection, closing each session with the Intelligence Server if one exists.void
removeAll(boolean closeSession)
Removes all sessions from the collection.void
setActiveSession(WebSessionInfo si)
Sets the given session to be the active session in the list.int
size()
Returns the size of the list.-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
-
-
-
Method Detail
-
size
int size()
Returns the size of the list.- Returns:
- The size of the list.
-
get
WebSessionInfo get(int i) throws java.lang.IndexOutOfBoundsException
Obtains the session in the list at the given index.- Parameters:
i
- The index of the session to retrieve.- Returns:
- The
WebSessionInfo
object at the given index. - Throws:
java.lang.IndexOutOfBoundsException
- If the index does not exist in the collection.
-
setActiveSession
void setActiveSession(WebSessionInfo si) throws java.lang.IllegalArgumentException
Sets the given session to be the active session in the list.- Parameters:
si
- TheWebSessionInfo
object which is to be made active.- Throws:
java.lang.IllegalArgumentException
- Thrown if the session does not exist in the list.
-
getActiveSession
WebSessionInfo getActiveSession()
Returns the currently active session. Note that if there does not currently exist an active session, a new one will be designated on the fly. If there exist no sessions in the collection, then an empty one will be created, added to the list, and set as the active session. This behavior is to keep compatibility with the old behavior of the Web Objects - the WebObjectsFactory expects there to always be some kind of active session.- Returns:
- The current active
WebSessionInfo
object.
-
remove
void remove(WebSessionInfo session) throws java.lang.IllegalArgumentException
Removes the given session from the collection, closing the session on the object if one exists. Note that once the session is removed from the collection, it is dead - it can only be used to obtain state from and as an argument to populate.- Parameters:
session
- TheWebSessionInfo
object to remove from the collection.- Throws:
java.lang.IllegalArgumentException
- Thrown if the given session does not exist in the collection.
-
removeAll
void removeAll()
Removes all sessions from the collection, closing each session with the Intelligence Server if one exists. Note that once a session is removed from the collection, it is dead - it can only be used to obtain state from and as an argument to populate.
-
remove
void remove(WebSessionInfo session, boolean closeSession) throws java.lang.IllegalArgumentException
Removes the given session from the collection. The closeSession parameter will determine whether the session with the server should be closed as well or not. Note that once the session is removed from the collection, it is dead - it can only be used to obtain state from and as an argument to populate.- Parameters:
session
- TheWebSessionInfo
object to remove from the collection.closeSession
- If this is true, then the session will be closed. If this is false, then the session will remain open.- Throws:
java.lang.IllegalArgumentException
- Thrown if the given session does not exist in the collection.
-
removeAll
void removeAll(boolean closeSession)
Removes all sessions from the collection. The closeSession parameter will determine whether the session with the server should be closed at the time of removal. Note that once a session is removed from the collection, it is dead - it can only be used to obtain state from and as an argument to populate.- Parameters:
closeSession
- If this is true, then all sessions will be closed. If this is false, then those sessions will remain open.
-
getFactory
WebObjectsFactory getFactory()
Returns the ownerWebObjectsFactory
object. The WebObjectsFactory object and this object have a 1:1 relationship - there exists one session list of a particular type per factory.- Returns:
- The
WebObjectsFactory
object associated with this list.
-
-