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 IDSSXMLSessionId
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IDSSXMLSessionId.Factory
Factory class is used to create the various Session Id objects from the augmented session id stringstatic interface
IDSSXMLSessionId.IConfigSessionId
IConfigSessionId is a configuration session id (ConfigSessionId)static interface
IDSSXMLSessionId.IMasterSessionId
IMasterSessionId is a master session id (MasterSessionId)static interface
IDSSXMLSessionId.IProjectSessionId
IProjectSessionId is a project session id (ProjectSessionId)static class
IDSSXMLSessionId.TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLocale(int iLocale)
void
addMessageId(java.lang.String iMessageId)
void
addProjectId(java.lang.String iProjectId)
void
addRetVal(int iRetVal)
void
addSSProjectId(java.lang.String iSSProjectId)
IDSSXMLSessionId.IConfigSessionId
castConfigSessionId()
castConfigSessionId returns the IConfigSessionId already cast.IDSSXMLSessionId.IMasterSessionId
castMasterSessionId()
castMasterSessionId returns the IMasterSessionId already cast.IDSSXMLSessionId.IProjectSessionId
castProjectSessionId()
castProjectSessionId returns the IPsid already cast.IDSSXMLSessionId
Clone()
Clone will create a new copy of the IDSSXMLSessionId.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.java.lang.String
getIServerNodeName()
getIServerNodeName extracts the IServer node name from the sessionID.int
getLocale()
getLocale extracts the locale from the sessionID.java.lang.String
getMessageId()
getMessageId extracts the message id from the sessionID.java.lang.String
getObscuredAugmentedSessionId()
getObscuredAugmentedSessionId
returns as a string the augmentedSessionId, except that the IServer session id is obscured.int
getPort()
java.lang.String
getProjectId()
getProjectId extracts the project id from the sessionID.int
getRetVal()
getRetVal extracts the return value from the sessionID.java.lang.String
getSessionId()
getSessionId extracts only the 32 character GUID.java.lang.String
getSSProjectId()
getSSProjectId extracts the project id from the sessionID.IDSSXMLSessionId.TYPE
getType()
getType returns what type of SessionId this is.boolean
hasLocale()
boolean
hasMessageId()
boolean
hasProjectId()
boolean
hasRetVal()
boolean
hasSSProjectId()
-
-
-
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 MSTRWebAPIException
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
- Throws:
MSTRWebAPIException
-
addLocale
void addLocale(int iLocale) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasLocale
boolean hasLocale()
-
getRetVal
int getRetVal() throws MSTRWebAPIException
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
- Throws:
MSTRWebAPIException
-
addRetVal
void addRetVal(int iRetVal) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasRetVal
boolean hasRetVal()
-
getMessageId
java.lang.String getMessageId() throws MSTRWebAPIException
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
- Throws:
MSTRWebAPIException
-
addMessageId
void addMessageId(java.lang.String iMessageId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasMessageId
boolean hasMessageId()
-
getProjectId
java.lang.String getProjectId() throws MSTRWebAPIException
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
- Throws:
MSTRWebAPIException
-
addProjectId
void addProjectId(java.lang.String iProjectId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasProjectId
boolean hasProjectId()
-
getSSProjectId
java.lang.String getSSProjectId() throws MSTRWebAPIException
getSSProjectId 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()
getObscuredAugmentedSessionId
returns 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
-
-