Package com.microstrategy.webapi.acm
Class ACMSessionIdParser
- java.lang.Object
-
- com.microstrategy.webapi.IDSSXMLSessionIdParser
-
- com.microstrategy.webapi.acm.ACMSessionIdParser
-
public class ACMSessionIdParser extends IDSSXMLSessionIdParser
ACMSessionIdParser is the implementation of the IDSSXMLSessionId
ACMSessionIdParser is the ONLY place that knows about the content and syntax of the sessionId.
The Syntax:
(1) The 32 character GUID that represents the sessionID as given out by IServer is the first 32 characters in the sessionID
(2) If the string is less than 32 characters, then this cannot represent a GUID and the constructor will throw an exception
(3) There are six possible delimiters (:^~#@$)
(4) The 33rd character up to the end of the string or the first delimiter, whichever comes first, is the machine name
(5) The machine name must exist
(6) The parameter after ":" and up to the end of the string or the next delimiter is the locale
(7) The locale may not exist
(8) The parameter after "^" and up to the end of the string or the next delimiter is the return value
(9) The return value may not exist
(10) The parameter after "~" and up to the end of the string or the next delimiter is the message id
(11) The message idmay not exist
(12) The parameter after "#" and up to the end of the string or the next delimiter is the project id
(13) The project id may not exist
(14) The parameter after "@" and up to the end of the string or the next delimiter is the port associated with the machine (15) The port must exist (16) The parameter after "$" and up to the end of the string or the next delimiter is the session type ("MASTER", "CONFIG", "PROJECT") (17) The type must exist (18) The parameter after "*" and up to the end of the string or the next delimiter is the should close ("CLOSE", "DONTCLOSE") (19) The should close value may not exist. The default is CLOSE (18) If any parameter has invalid syntax then the entire sessionID is assumed invalid
Valid sessionID examples:
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033^1~00000000000000000000000000000000#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DD@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7^1@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7~00000000000000000000000000000000@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033^1@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033~00000000000000000000000000000000@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033~00000000000000000000000000000000@34952$MASTER*DONTCLOSE
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCSIDPIDDELIMITER
-
Constructor Summary
Constructors Constructor Description ACMSessionIdParser(java.lang.String iAugmentedSessionId)ACMSessionIdParser(java.lang.String iAugmentedSessionId, IDSSXMLSessionId.TYPE iType)
-
Method Summary
All Methods Instance Methods Concrete 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)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()intgetLocale()java.lang.StringgetMessageId()java.lang.StringgetObscuredAugmentedSessionId()getObscuredAugmentedSessionIdreturns as a string the augmentedSessionId, except that the IServer session id is obscured.intgetPort()java.lang.StringgetProjectId()intgetRetVal()java.lang.StringgetSessionId()java.lang.StringgetSSProjectId()IDSSXMLSessionId.TYPEgetType()booleanhasLocale()booleanhasMessageId()booleanhasProjectId()booleanhasRetVal()booleanhasSSProjectId()-
Methods inherited from class com.microstrategy.webapi.IDSSXMLSessionIdParser
builder, builder, convertToConfigSessionId, convertToProjectSessionId, getIServerNodeName, getLocale, getMessageId, getPid, getPort, getRetVal, getSessionId, getSSPid, getType, instance
-
-
-
-
Field Detail
-
CSIDPIDDELIMITER
public static final java.lang.String CSIDPIDDELIMITER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ACMSessionIdParser
public ACMSessionIdParser(java.lang.String iAugmentedSessionId, IDSSXMLSessionId.TYPE iType) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
ACMSessionIdParser
public ACMSessionIdParser(java.lang.String iAugmentedSessionId) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
-
Method Detail
-
getAugmentedSessionId
public java.lang.String getAugmentedSessionId()
Description copied from class:IDSSXMLSessionIdParsergetAugmentedSessionId 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.- Specified by:
getAugmentedSessionIdin classIDSSXMLSessionIdParser- Returns:
- the full augmented Session Id
-
getObscuredAugmentedSessionId
public java.lang.String getObscuredAugmentedSessionId()
Description copied from class:IDSSXMLSessionIdParsergetObscuredAugmentedSessionIdreturns 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- Specified by:
getObscuredAugmentedSessionIdin classIDSSXMLSessionIdParser- Returns:
- the obscured augmented Session Id
-
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionIdin classIDSSXMLSessionIdParser
-
getIServerNodeName
public java.lang.String getIServerNodeName()
- Specified by:
getIServerNodeNamein classIDSSXMLSessionIdParser
-
getPort
public int getPort()
- Specified by:
getPortin classIDSSXMLSessionIdParser
-
getType
public IDSSXMLSessionId.TYPE getType()
- Specified by:
getTypein classIDSSXMLSessionIdParser
-
addLocale
public void addLocale(int iLocale) throws MSTRWebAPIException- Specified by:
addLocalein classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
hasLocale
public boolean hasLocale()
- Specified by:
hasLocalein classIDSSXMLSessionIdParser
-
getLocale
public int getLocale() throws MSTRWebAPIException- Specified by:
getLocalein classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
addRetVal
public void addRetVal(int iRetVal) throws MSTRWebAPIException- Specified by:
addRetValin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
hasRetVal
public boolean hasRetVal()
- Specified by:
hasRetValin classIDSSXMLSessionIdParser
-
getRetVal
public int getRetVal() throws MSTRWebAPIException- Specified by:
getRetValin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
addMessageId
public void addMessageId(java.lang.String iMessageId) throws MSTRWebAPIException- Specified by:
addMessageIdin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
hasMessageId
public boolean hasMessageId()
- Specified by:
hasMessageIdin classIDSSXMLSessionIdParser
-
getMessageId
public java.lang.String getMessageId() throws MSTRWebAPIException- Specified by:
getMessageIdin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
addProjectId
public void addProjectId(java.lang.String iProjectId) throws MSTRWebAPIException- Specified by:
addProjectIdin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
hasProjectId
public boolean hasProjectId()
- Specified by:
hasProjectIdin classIDSSXMLSessionIdParser
-
getProjectId
public java.lang.String getProjectId() throws MSTRWebAPIException- Specified by:
getProjectIdin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
addSSProjectId
public void addSSProjectId(java.lang.String iSSProjectId) throws MSTRWebAPIException- Specified by:
addSSProjectIdin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
hasSSProjectId
public boolean hasSSProjectId()
- Specified by:
hasSSProjectIdin classIDSSXMLSessionIdParser
-
getSSProjectId
public java.lang.String getSSProjectId() throws MSTRWebAPIException- Specified by:
getSSProjectIdin classIDSSXMLSessionIdParser- Throws:
MSTRWebAPIException
-
-