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 class
ACMSessionId.ConfigSessionId
static class
ACMSessionId.MasterSessionId
static class
ACMSessionId.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 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)
abstract IDSSXMLSessionId.IConfigSessionId
castConfigSessionId()
castConfigSessionId returns the IConfigSessionId already cast.abstract IDSSXMLSessionId.IProjectSessionId
castProjectSessionId()
castProjectSessionId returns the IPsid already cast.abstract ACMSessionId
Clone()
Clone will create a new copy of the IDSSXMLSessionId.int
compareTo(ACMSessionId iACMSessionId)
boolean
equals(java.lang.Object iThat)
equals compares ONLY the Session Id proper.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.int
hashCode()
hash hashes ONLY the Session Id proper.boolean
hasLocale()
boolean
hasMessageId()
boolean
hasProjectId()
boolean
hasRetVal()
boolean
hasSSProjectId()
-
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:IDSSXMLSessionId
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- Specified by:
castConfigSessionId
in 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:IDSSXMLSessionId
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- Specified by:
castProjectSessionId
in 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:IDSSXMLSessionId
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- Specified by:
Clone
in interfaceIDSSXMLSessionId
- Returns:
- the cloned Session Id
- Throws:
MSTRWebAPIException
-
getSessionId
public java.lang.String getSessionId()
Description copied from interface:IDSSXMLSessionId
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.- Specified by:
getSessionId
in interfaceIDSSXMLSessionId
- Returns:
- the Session Id GUID
-
getIServerNodeName
public java.lang.String getIServerNodeName()
Description copied from interface:IDSSXMLSessionId
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()- Specified by:
getIServerNodeName
in interfaceIDSSXMLSessionId
- Returns:
- the IServer Node Name
-
getPort
public int getPort()
- Specified by:
getPort
in interfaceIDSSXMLSessionId
-
getType
public IDSSXMLSessionId.TYPE getType()
Description copied from interface:IDSSXMLSessionId
getType returns what type of SessionId this is. It is either MasterSessionId, ConfigSessionId, or Psid- Specified by:
getType
in interfaceIDSSXMLSessionId
- Returns:
- The Session Id type
-
addLocale
public void addLocale(int iLocale) throws MSTRWebAPIException
- Specified by:
addLocale
in interfaceIDSSXMLSessionId
- Throws:
MSTRWebAPIException
-
hasLocale
public boolean hasLocale()
- Specified by:
hasLocale
in interfaceIDSSXMLSessionId
-
getLocale
public int getLocale() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionId
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()- Specified by:
getLocale
in interfaceIDSSXMLSessionId
- Returns:
- the Locale
- Throws:
MSTRWebAPIException
-
addRetVal
public void addRetVal(int iRetVal) throws MSTRWebAPIException
- Specified by:
addRetVal
in interfaceIDSSXMLSessionId
- Throws:
MSTRWebAPIException
-
hasRetVal
public boolean hasRetVal()
- Specified by:
hasRetVal
in interfaceIDSSXMLSessionId
-
getRetVal
public int getRetVal() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionId
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()- Specified by:
getRetVal
in interfaceIDSSXMLSessionId
- Returns:
- the RetVal
- Throws:
MSTRWebAPIException
-
addMessageId
public void addMessageId(java.lang.String iMessageId) throws MSTRWebAPIException
- Specified by:
addMessageId
in interfaceIDSSXMLSessionId
- Throws:
MSTRWebAPIException
-
hasMessageId
public boolean hasMessageId()
- Specified by:
hasMessageId
in interfaceIDSSXMLSessionId
-
getMessageId
public java.lang.String getMessageId() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionId
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()- Specified by:
getMessageId
in interfaceIDSSXMLSessionId
- Returns:
- the Message Id
- Throws:
MSTRWebAPIException
-
addProjectId
public void addProjectId(java.lang.String iProjectId) throws MSTRWebAPIException
- Specified by:
addProjectId
in interfaceIDSSXMLSessionId
- Throws:
MSTRWebAPIException
-
hasProjectId
public boolean hasProjectId()
- Specified by:
hasProjectId
in interfaceIDSSXMLSessionId
-
getProjectId
public java.lang.String getProjectId() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionId
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()- Specified by:
getProjectId
in interfaceIDSSXMLSessionId
- Returns:
- the Project Id
- Throws:
MSTRWebAPIException
-
addSSProjectId
public void addSSProjectId(java.lang.String iSSProjectId) throws MSTRWebAPIException
- Specified by:
addSSProjectId
in interfaceIDSSXMLSessionId
- Throws:
MSTRWebAPIException
-
hasSSProjectId
public boolean hasSSProjectId()
- Specified by:
hasSSProjectId
in interfaceIDSSXMLSessionId
-
getSSProjectId
public java.lang.String getSSProjectId() throws MSTRWebAPIException
Description copied from interface:IDSSXMLSessionId
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()- Specified by:
getSSProjectId
in interfaceIDSSXMLSessionId
- Returns:
- the Project Id
- Throws:
MSTRWebAPIException
-
getAugmentedSessionId
public java.lang.String getAugmentedSessionId()
Description copied from interface:IDSSXMLSessionId
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.- Specified by:
getAugmentedSessionId
in interfaceIDSSXMLSessionId
- Returns:
- the full augmented Session Id
-
getObscuredAugmentedSessionId
public java.lang.String getObscuredAugmentedSessionId()
Description copied from interface:IDSSXMLSessionId
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
- Specified by:
getObscuredAugmentedSessionId
in interfaceIDSSXMLSessionId
- Returns:
- the obscured augmented Session Id
-
compareTo
public int compareTo(ACMSessionId iACMSessionId)
- Specified by:
compareTo
in 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:
equals
in 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:
hashCode
in classjava.lang.Object
-
-