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 java.util.Optional<IDSSXMLSessionId.IConfigSessionId>
castConfigSessionIdOpt()
abstract IDSSXMLSessionId.IProjectSessionId
castProjectSessionId()
castProjectSessionId returns the IPsid already cast.abstract java.util.Optional<IDSSXMLSessionId.IProjectSessionId>
castProjectSessionIdOpt()
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.util.Optional<java.lang.Integer>
getLocaleOpt()
java.lang.String
getMessageId()
getMessageId extracts the message id from the sessionID.java.util.Optional<java.lang.String>
getMessageIdOpt()
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.java.util.Optional<java.lang.String>
getProjectIdOpt()
int
getRetVal()
getRetVal extracts the return value from the sessionID.java.util.Optional<java.lang.Integer>
getRetValOpt()
java.lang.String
getSessionId()
getSessionId extracts only the 32 character GUID.java.lang.String
getSSProjectId()
getSSProjectId extracts the project id from the sessionID.java.util.Optional<java.lang.String>
getSSProjectIdOpt()
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, castMasterSessionIdOpt, getConfigSessionId, getMasterSessionId, getProjectSessionId
-
-
-
-
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
-
castConfigSessionIdOpt
public abstract java.util.Optional<IDSSXMLSessionId.IConfigSessionId> castConfigSessionIdOpt()
- Specified by:
castConfigSessionIdOpt
in interfaceIDSSXMLSessionId
-
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
-
castProjectSessionIdOpt
public abstract java.util.Optional<IDSSXMLSessionId.IProjectSessionId> castProjectSessionIdOpt()
- Specified by:
castProjectSessionIdOpt
in interfaceIDSSXMLSessionId
-
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)
- Specified by:
addLocale
in interfaceIDSSXMLSessionId
-
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
-
getLocaleOpt
public java.util.Optional<java.lang.Integer> getLocaleOpt()
- Specified by:
getLocaleOpt
in interfaceIDSSXMLSessionId
-
addRetVal
public void addRetVal(int iRetVal)
- Specified by:
addRetVal
in interfaceIDSSXMLSessionId
-
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
-
getRetValOpt
public java.util.Optional<java.lang.Integer> getRetValOpt()
- Specified by:
getRetValOpt
in interfaceIDSSXMLSessionId
-
addMessageId
public void addMessageId(java.lang.String iMessageId)
- Specified by:
addMessageId
in interfaceIDSSXMLSessionId
-
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
-
getMessageIdOpt
public java.util.Optional<java.lang.String> getMessageIdOpt()
- Specified by:
getMessageIdOpt
in interfaceIDSSXMLSessionId
-
addProjectId
public void addProjectId(java.lang.String iProjectId)
- Specified by:
addProjectId
in interfaceIDSSXMLSessionId
-
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
-
getProjectIdOpt
public java.util.Optional<java.lang.String> getProjectIdOpt()
- Specified by:
getProjectIdOpt
in interfaceIDSSXMLSessionId
-
addSSProjectId
public void addSSProjectId(java.lang.String iSSProjectId)
- Specified by:
addSSProjectId
in interfaceIDSSXMLSessionId
-
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
-
getSSProjectIdOpt
public java.util.Optional<java.lang.String> getSSProjectIdOpt()
- Specified by:
getSSProjectIdOpt
in interfaceIDSSXMLSessionId
-
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
-
-