Package com.microstrategy.webapi
Interface IDSSXMLSessionId
-
- All Known Subinterfaces:
IDSSXMLSessionId.IConfigSessionId,IDSSXMLSessionId.IMasterSessionId,IDSSXMLSessionId.IProjectSessionId
- All Known Implementing Classes:
ACMSessionId,ACMSessionId.ConfigSessionId,ACMSessionId.MasterSessionId,ACMSessionId.ProjectSessionId
public interface IDSSXMLSessionIdIDSSXMLSessionId 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIDSSXMLSessionId.FactoryFactory class is used to create the various Session Id objects from the augmented session id stringstatic interfaceIDSSXMLSessionId.IConfigSessionIdIConfigSessionId is a configuration session id (ConfigSessionId)static interfaceIDSSXMLSessionId.IMasterSessionIdIMasterSessionId is a master session id (MasterSessionId)static interfaceIDSSXMLSessionId.IProjectSessionIdIProjectSessionId is a project session id (ProjectSessionId)static classIDSSXMLSessionId.TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLocale(int iLocale)voidaddMessageId(java.lang.String iMessageId)voidaddProjectId(java.lang.String iProjectId)voidaddRetVal(int iRetVal)voidaddSSProjectId(java.lang.String iSSProjectId)IDSSXMLSessionId.IConfigSessionIdcastConfigSessionId()castConfigSessionId returns the IConfigSessionId already cast.IDSSXMLSessionId.IMasterSessionIdcastMasterSessionId()castMasterSessionId returns the IMasterSessionId already cast.IDSSXMLSessionId.IProjectSessionIdcastProjectSessionId()castProjectSessionId returns the IPsid already cast.IDSSXMLSessionIdClone()Clone will create a new copy of the IDSSXMLSessionId.java.lang.StringgetAugmentedSessionId()getAugmentedSessionId returns as a string the full sessionID including the IServer node name, locale, return value, message id,and/or the project id.java.lang.StringgetIServerNodeName()getIServerNodeName extracts the IServer node name from the sessionID.intgetLocale()getLocale extracts the locale from the sessionID.java.lang.StringgetMessageId()getMessageId extracts the message id from the sessionID.java.lang.StringgetObscuredAugmentedSessionId()getObscuredAugmentedSessionIdreturns as a string the augmentedSessionId, except that the IServer session id is obscured.intgetPort()java.lang.StringgetProjectId()getProjectId extracts the project id from the sessionID.intgetRetVal()getRetVal extracts the return value from the sessionID.java.lang.StringgetSessionId()getSessionId extracts only the 32 character GUID.java.lang.StringgetSSProjectId()getSSProjectId extracts the project id from the sessionID.IDSSXMLSessionId.TYPEgetType()getType returns what type of SessionId this is.booleanhasLocale()booleanhasMessageId()booleanhasProjectId()booleanhasRetVal()booleanhasSSProjectId()
-
-
-
Method Detail
-
getType
IDSSXMLSessionId.TYPE getType()
getType returns what type of SessionId this is. It is either MasterSessionId, ConfigSessionId, or Psid- Returns:
- The Session Id type
-
castMasterSessionId
IDSSXMLSessionId.IMasterSessionId castMasterSessionId() throws MSTRWebAPIException
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
-
castConfigSessionId
IDSSXMLSessionId.IConfigSessionId castConfigSessionId() throws MSTRWebAPIException
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
-
castProjectSessionId
IDSSXMLSessionId.IProjectSessionId castProjectSessionId() throws MSTRWebAPIException
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
-
Clone
IDSSXMLSessionId Clone() throws MSTRWebAPIException
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
- Throws:
MSTRWebAPIException
-
getSessionId
java.lang.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
-
getIServerNodeName
java.lang.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
- Throws:
MSTRWebAPIException
-
getPort
int getPort()
-
getLocale
int getLocale() throws MSTRWebAPIExceptiongetLocale 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
- Throws:
MSTRWebAPIException
-
addLocale
void addLocale(int iLocale) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
hasLocale
boolean hasLocale()
-
getRetVal
int getRetVal() throws MSTRWebAPIExceptiongetRetVal 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
- Throws:
MSTRWebAPIException
-
addRetVal
void addRetVal(int iRetVal) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
hasRetVal
boolean hasRetVal()
-
getMessageId
java.lang.String getMessageId() throws MSTRWebAPIExceptiongetMessageId 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
- Throws:
MSTRWebAPIException
-
addMessageId
void addMessageId(java.lang.String iMessageId) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
hasMessageId
boolean hasMessageId()
-
getProjectId
java.lang.String getProjectId() throws MSTRWebAPIExceptiongetProjectId 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
- Throws:
MSTRWebAPIException
-
addProjectId
void addProjectId(java.lang.String iProjectId) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
hasProjectId
boolean hasProjectId()
-
getSSProjectId
java.lang.String getSSProjectId() throws MSTRWebAPIExceptiongetSSProjectId 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
- Throws:
MSTRWebAPIException
-
addSSProjectId
void addSSProjectId(java.lang.String iSSProjectId) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
hasSSProjectId
boolean hasSSProjectId()
-
getAugmentedSessionId
java.lang.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
-
getObscuredAugmentedSessionId
java.lang.String getObscuredAugmentedSessionId()
getObscuredAugmentedSessionIdreturns as a string the augmentedSessionId, except that the IServer session id is obscured. This is suitable for logging.
This
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033^1~00000000000000000000000000000000#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
becomes
A633E...DFM-WIN-VS15-7:1033^1~00000000000000000000000000000000#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER- Returns:
- the obscured augmented Session Id
-
-