public interface

IDSSXMLSessionId

com.microstrategy.webapi.IDSSXMLSessionId
Known Indirect Subclasses

Class Overview

IDSSXMLSessionId is the object version of the sessionID. The sessionID is a string that comes from IServer. It originally was a 32 character GUID. But, the user should never make any assumptions about the contents or format of a sessionID string. Use this class to extract the different parts of the sessionID. Note, IDSSSessionIdParser will help extract portions of the sessionID without ever having to actually create a IDSSXMLSessionId object.

IDSSXMLSessionId also lets you differentiate between a configuration session id (ConfigSessionId) and a project session id (Psid). Although both session ids (Sids) have the same syntax, they are semantically different. The underlying connections and what you can do with them are different. So, IDSSXMLSessionId allows the compiler to understand which is which.

Summary

Nested Classes
class IDSSXMLSessionId.Factory Factory class is used to create the various Session Id objects from the augmented session id string 
interface IDSSXMLSessionId.IConfigSessionId IConfigSessionId is a configuration session id (ConfigSessionId) 
interface IDSSXMLSessionId.IMasterSessionId IMasterSessionId is a master session id (MasterSessionId) 
interface IDSSXMLSessionId.IProjectSessionId IProjectSessionId is a project session id (ProjectSessionId) 
enum IDSSXMLSessionId.TYPE  
Public Methods
abstract IDSSXMLSessionId Clone()
Clone will create a new copy of the IDSSXMLSessionId.
abstract void addLocale(int iLocale)
abstract void addMessageId(String iMessageId)
abstract void addProjectId(String iProjectId)
abstract void addRetVal(int iRetVal)
abstract IDSSXMLSessionId.IConfigSessionId castConfigSessionId()
castConfigSessionId returns the IConfigSessionId already cast.
abstract IDSSXMLSessionId.IMasterSessionId castMasterSessionId()
castMasterSessionId returns the IMasterSessionId already cast.
abstract IDSSXMLSessionId.IProjectSessionId castProjectSessionId()
castProjectSessionId returns the IPsid already cast.
abstract String getAugmentedSessionId()
getAugmentedSessionId returns as a string the full sessionID including the IServer node name, locale, return value, message id,and/or the project id.
abstract String getIServerNodeName()
getIServerNodeName extracts the IServer node name from the sessionID.
abstract int getLocale()
getLocale extracts the locale from the sessionID.
abstract String getMessageId()
getMessageId extracts the message id from the sessionID.
abstract int getPort()
abstract String getProjectId()
getProjectId extracts the project id from the sessionID.
abstract int getRetVal()
getRetVal extracts the return value from the sessionID.
abstract String getSessionId()
getSessionId extracts only the 32 character GUID.
abstract IDSSXMLSessionId.TYPE getType()
getType returns what type of SessionId this is.
abstract boolean hasLocale()
abstract boolean hasMessageId()
abstract boolean hasProjectId()
abstract boolean hasRetVal()

Public Methods

public abstract IDSSXMLSessionId Clone ()

Clone will create a new copy of the IDSSXMLSessionId. This is good because the ConfigSessionIds and ProjectSessionIds are held inside a number of maps and will be accessed on different threads. To avoid locking, it is good to create a Clone that you can use temporarily

Returns
  • the cloned Session Id

public abstract void addLocale (int iLocale)

public abstract void addMessageId (String iMessageId)

public abstract void addProjectId (String iProjectId)

public abstract void addRetVal (int iRetVal)

public abstract IDSSXMLSessionId.IConfigSessionId castConfigSessionId ()

castConfigSessionId returns the IConfigSessionId already cast. If this object is not a ConfigSessionId it will throw MSTRWebAPIException. To avoid the throw use getType to find out what type it is before casting

Returns
  • the cast Configuration Session Id
Throws
MSTRWebAPIException when it is not a Configuration Session Id

public abstract IDSSXMLSessionId.IMasterSessionId castMasterSessionId ()

castMasterSessionId returns the IMasterSessionId already cast. If this object is not a MasterSessionId it will throw MSTRWebAPIException. To avoid the throw use getType to find out what type it is before casting

Returns
  • the cast Master Session Id
Throws
MSTRWebAPIException when it is not a Master Session Id

public abstract IDSSXMLSessionId.IProjectSessionId castProjectSessionId ()

castProjectSessionId returns the IPsid already cast. If this object is not a ProjectSessionId it will throw MSTRWebAPIException. To avoid the throw use getType to find out what type it is before casting

Returns
  • the cast Project Session Id
Throws
MSTRWebAPIException when it is not a Project Session Id

public abstract String getAugmentedSessionId ()

getAugmentedSessionId returns as a string the full sessionID including the IServer node name, locale, return value, message id,and/or the project id. This string can be used by methods in the Web SDK. It is important to not make any assumptions about the contents and/or syntax of the string.

Returns
  • the full augmented Session Id

public abstract String getIServerNodeName ()

getIServerNodeName extracts the IServer node name from the sessionID. It will throw if it is not part of the sessionID. To avoid the throw, first use hasIServerNodeName()

Returns
  • the IServer Node Name

public abstract int getLocale ()

getLocale extracts the locale from the sessionID. It will throw if it is not part of the sessionID. To avoid the throw, first use hasLocale()

Returns
  • the Locale

public abstract String getMessageId ()

getMessageId extracts the message id from the sessionID. It will throw if it is not part of the sessionID. To avoid the throw, first use hasMessageId()

Returns
  • the Message Id

public abstract int getPort ()

public abstract String getProjectId ()

getProjectId extracts the project id from the sessionID. It will throw if it is not part of the sessionID. To avoid the throw, first use hasPid()

Returns
  • the Project Id

public abstract int getRetVal ()

getRetVal extracts the return value from the sessionID. It will throw if it is not part of the sessionID. To avoid the throw, first use hasRetVal()

Returns
  • the RetVal

public abstract String getSessionId ()

getSessionId extracts only the 32 character GUID. This is the only portion of the sessionID that is guaranteed to exists (note this method does not throw). If that portion is missing, then the IDSSXMLSessionId object will throw during construction.

Returns
  • the Session Id GUID

public abstract IDSSXMLSessionId.TYPE getType ()

getType returns what type of SessionId this is. It is either MasterSessionId, ConfigSessionId, or Psid

Returns
  • The Session Id type

public abstract boolean hasLocale ()

public abstract boolean hasMessageId ()

public abstract boolean hasProjectId ()

public abstract boolean hasRetVal ()