Package com.microstrategy.webapi.acm
Class ACMSessionId
- java.lang.Object
-
- com.microstrategy.webapi.acm.ACMSessionId
-
- All Implemented Interfaces:
IDSSXMLSessionId,java.lang.Comparable<ACMSessionId>
- Direct Known Subclasses:
ACMSessionId.ConfigSessionId,ACMSessionId.MasterSessionId,ACMSessionId.ProjectSessionId
public abstract class ACMSessionId extends java.lang.Object implements IDSSXMLSessionId, java.lang.Comparable<ACMSessionId>
ACMSessionId is the implementation of the IDSSXMLSessionId
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classACMSessionId.ConfigSessionIdstatic classACMSessionId.MasterSessionIdstatic classACMSessionId.ProjectSessionId-
Nested classes/interfaces inherited from interface com.microstrategy.webapi.IDSSXMLSessionId
IDSSXMLSessionId.Factory, IDSSXMLSessionId.IConfigSessionId, IDSSXMLSessionId.IMasterSessionId, IDSSXMLSessionId.IProjectSessionId, IDSSXMLSessionId.TYPE
-
-
Constructor Summary
Constructors Constructor Description ACMSessionId(IDSSXMLSessionIdParser iSessionIdParser)ACMSessionId(java.lang.String iAugmentedSessionId, IDSSXMLSessionId.TYPE iType)
-
Method Summary
All Methods Instance Methods Abstract 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)abstract IDSSXMLSessionId.IConfigSessionIdcastConfigSessionId()castConfigSessionId returns the IConfigSessionId already cast.abstract IDSSXMLSessionId.IProjectSessionIdcastProjectSessionId()castProjectSessionId returns the IPsid already cast.abstract ACMSessionIdClone()Clone will create a new copy of the IDSSXMLSessionId.intcompareTo(ACMSessionId iACMSessionId)booleanequals(java.lang.Object iThat)equals compares ONLY the Session Id proper.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.inthashCode()hash hashes ONLY the Session Id proper.booleanhasLocale()booleanhasMessageId()booleanhasProjectId()booleanhasRetVal()booleanhasSSProjectId()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.webapi.IDSSXMLSessionId
castMasterSessionId
-
-
-
-
Constructor Detail
-
ACMSessionId
public ACMSessionId(java.lang.String iAugmentedSessionId, IDSSXMLSessionId.TYPE iType) throws MSTRWebAPIException- Throws:
MSTRWebAPIException
-
ACMSessionId
public ACMSessionId(IDSSXMLSessionIdParser iSessionIdParser) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
-
Method Detail
-
castConfigSessionId
public abstract IDSSXMLSessionId.IConfigSessionId castConfigSessionId() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionIdcastConfigSessionId 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- Specified by:
castConfigSessionIdin interfaceIDSSXMLSessionId- Returns:
- the cast Configuration Session Id
- Throws:
MSTRWebAPIException- when it is not a Configuration Session Id
-
castProjectSessionId
public abstract IDSSXMLSessionId.IProjectSessionId castProjectSessionId() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionIdcastProjectSessionId 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- Specified by:
castProjectSessionIdin interfaceIDSSXMLSessionId- Returns:
- the cast Project Session Id
- Throws:
MSTRWebAPIException- when it is not a Project Session Id
-
Clone
public abstract ACMSessionId Clone() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionIdClone 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- Specified by:
Clonein interfaceIDSSXMLSessionId- Returns:
- the cloned Session Id
- Throws:
MSTRWebAPIException
-
getSessionId
public java.lang.String getSessionId()
Description copied from interface:IDSSXMLSessionIdgetSessionId 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.- Specified by:
getSessionIdin interfaceIDSSXMLSessionId- Returns:
- the Session Id GUID
-
getIServerNodeName
public java.lang.String getIServerNodeName()
Description copied from interface:IDSSXMLSessionIdgetIServerNodeName 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()- Specified by:
getIServerNodeNamein interfaceIDSSXMLSessionId- Returns:
- the IServer Node Name
-
getPort
public int getPort()
- Specified by:
getPortin interfaceIDSSXMLSessionId
-
getType
public IDSSXMLSessionId.TYPE getType()
Description copied from interface:IDSSXMLSessionIdgetType returns what type of SessionId this is. It is either MasterSessionId, ConfigSessionId, or Psid- Specified by:
getTypein interfaceIDSSXMLSessionId- Returns:
- The Session Id type
-
addLocale
public void addLocale(int iLocale) throws MSTRWebAPIException- Specified by:
addLocalein interfaceIDSSXMLSessionId- Throws:
MSTRWebAPIException
-
hasLocale
public boolean hasLocale()
- Specified by:
hasLocalein interfaceIDSSXMLSessionId
-
getLocale
public int getLocale() throws MSTRWebAPIExceptionDescription copied from interface:IDSSXMLSessionIdgetLocale extracts the locale from the sessionID. It will throw if it is not part of the sessionID. To avoid the throw, first use hasLocale()- Specified by:
getLocalein interfaceIDSSXMLSessionId- Returns:
- the Locale
- Throws:
MSTRWebAPIException
-
addRetVal
public void addRetVal(int iRetVal) throws MSTRWebAPIException- Specified by:
addRetValin interfaceIDSSXMLSessionId- Throws:
MSTRWebAPIException
-
hasRetVal
public boolean hasRetVal()
- Specified by:
hasRetValin interfaceIDSSXMLSessionId
-
getRetVal
public int getRetVal() throws MSTRWebAPIExceptionDescription copied from interface:IDSSXMLSessionIdgetRetVal 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()- Specified by:
getRetValin interfaceIDSSXMLSessionId- Returns:
- the RetVal
- Throws:
MSTRWebAPIException
-
addMessageId
public void addMessageId(java.lang.String iMessageId) throws MSTRWebAPIException- Specified by:
addMessageIdin interfaceIDSSXMLSessionId- Throws:
MSTRWebAPIException
-
hasMessageId
public boolean hasMessageId()
- Specified by:
hasMessageIdin interfaceIDSSXMLSessionId
-
getMessageId
public java.lang.String getMessageId() throws MSTRWebAPIExceptionDescription copied from interface:IDSSXMLSessionIdgetMessageId 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()- Specified by:
getMessageIdin interfaceIDSSXMLSessionId- Returns:
- the Message Id
- Throws:
MSTRWebAPIException
-
addProjectId
public void addProjectId(java.lang.String iProjectId) throws MSTRWebAPIException- Specified by:
addProjectIdin interfaceIDSSXMLSessionId- Throws:
MSTRWebAPIException
-
hasProjectId
public boolean hasProjectId()
- Specified by:
hasProjectIdin interfaceIDSSXMLSessionId
-
getProjectId
public java.lang.String getProjectId() throws MSTRWebAPIExceptionDescription copied from interface:IDSSXMLSessionIdgetProjectId 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()- Specified by:
getProjectIdin interfaceIDSSXMLSessionId- Returns:
- the Project Id
- Throws:
MSTRWebAPIException
-
addSSProjectId
public void addSSProjectId(java.lang.String iSSProjectId) throws MSTRWebAPIException- Specified by:
addSSProjectIdin interfaceIDSSXMLSessionId- Throws:
MSTRWebAPIException
-
hasSSProjectId
public boolean hasSSProjectId()
- Specified by:
hasSSProjectIdin interfaceIDSSXMLSessionId
-
getSSProjectId
public java.lang.String getSSProjectId() throws MSTRWebAPIExceptionDescription copied from interface:IDSSXMLSessionIdgetSSProjectId 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()- Specified by:
getSSProjectIdin interfaceIDSSXMLSessionId- Returns:
- the Project Id
- Throws:
MSTRWebAPIException
-
getAugmentedSessionId
public java.lang.String getAugmentedSessionId()
Description copied from interface:IDSSXMLSessionIdgetAugmentedSessionId 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 interfaceIDSSXMLSessionId- Returns:
- the full augmented Session Id
-
getObscuredAugmentedSessionId
public java.lang.String getObscuredAugmentedSessionId()
Description copied from interface:IDSSXMLSessionIdgetObscuredAugmentedSessionIdreturns 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 interfaceIDSSXMLSessionId- Returns:
- the obscured augmented Session Id
-
compareTo
public int compareTo(ACMSessionId iACMSessionId)
- Specified by:
compareToin interfacejava.lang.Comparable<ACMSessionId>
-
equals
public boolean equals(java.lang.Object iThat)
equals compares ONLY the Session Id proper. It does not check the augmented parts. That's because the real Session Id does not include the augmented parts. The augmented parts are superfluous- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
hash hashes ONLY the Session Id proper. It does not hash the augmented parts. That's because the real Session Id does not include the augmented parts. The augmented parts are superfluous- Overrides:
hashCodein classjava.lang.Object
-
-