public interface

WebSessionInfoList

implements Persistable
com.microstrategy.web.objects.WebSessionInfoList
Known Indirect Subclasses

Class Overview

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.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract WebSessionInfo get(int i)
Obtains the session in the list at the given index.
abstract WebSessionInfo getActiveSession()
Returns the currently active session.
abstract WebObjectsFactory getFactory()
Returns the owner WebObjectsFactory object.
abstract void remove(WebSessionInfo session)
Removes the given session from the collection, closing the session on the object if one exists.
abstract void remove(WebSessionInfo session, boolean closeSession)
Removes the given session from the collection.
abstract void removeAll(boolean closeSession)
Removes all sessions from the collection.
abstract void removeAll()
Removes all sessions from the collection, closing each session with the Intelligence Server if one exists.
abstract void setActiveSession(WebSessionInfo si)
Sets the given session to be the active session in the list.
abstract int size()
Returns the size of the list.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable

Public Methods

public abstract WebSessionInfo get (int i)

Obtains the session in the list at the given index.

Parameters
i The index of the session to retrieve.
Returns
Throws
IndexOutOfBoundsException If the index does not exist in the collection.

public abstract 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

public abstract WebObjectsFactory getFactory ()

Returns the owner WebObjectsFactory object. The WebObjectsFactory object and this object have a 1:1 relationship - there exists one session list of a particular type per factory.

Returns

public abstract void remove (WebSessionInfo session)

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 The WebSessionInfo object to remove from the collection.
Throws
IllegalArgumentException Thrown if the given session does not exist in the collection.

public abstract void remove (WebSessionInfo session, boolean closeSession)

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 The WebSessionInfo 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
IllegalArgumentException Thrown if the given session does not exist in the collection.

public abstract 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.

public abstract 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.

public abstract void setActiveSession (WebSessionInfo si)

Sets the given session to be the active session in the list.

Parameters
si The WebSessionInfo object which is to be made active.
Throws
IllegalArgumentException Thrown if the session does not exist in the list.

public abstract int size ()

Returns the size of the list.

Returns
  • The size of the list.