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.
    • 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
      • 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
      • 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
      • 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
      • 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
      • 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