Class DSConfigMgrBase

  • All Implemented Interfaces:
    IDSConfigMgr

    public class DSConfigMgrBase
    extends Object
    implements IDSConfigMgr
    This object is the manager of all connection information. The server configuration file (serverconfig.xml) is loaded and cached in this object. This class exists as a singleton instance.
    • Constructor Detail

      • DSConfigMgrBase

        public DSConfigMgrBase()
    • Method Detail

      • getServerGroup

        public ServerGroup getServerGroup​(String serverGroupID)
        Gets the ServerGroup object reference for this serverGroupID.
        Specified by:
        getServerGroup in interface IDSConfigMgr
        Parameters:
        serverGroupID - The serverGroup ID for the ServerGroup to be retrieved.
        Returns:
        ServerGroup The ServerGroup reference; null if no such Server group exists
      • getHostName

        public String getHostName​(String serverGroupID)
        Description copied from interface: IDSConfigMgr
        Returns the host names for this id.
        Specified by:
        getHostName in interface IDSConfigMgr
        Parameters:
        serverGroupID - Server Group ID.
        Returns:
        host names.
      • getServerInstance

        public ServerInstance getServerInstance​(String serverGroupID,
                                                LDAPUser.Type authType)
        Given the server group ID, this method returns the active and best available server instance. The "best available" criteria is based on the priority. The priority is order in which the servers are listed in the configuration file. The first has the best priority and the last entry has the least priority. This method returns null if no qualified server instance is found or no such server group exists
        Parameters:
        serverGroupID - The serverGroupID for which the server instance is fetched.
        authType - The auth type is the privilege that the user in the configuration must have.
        Returns:
        ServerInstance The server instance object that holds the server configuration information.
        See Also:
        LDAPUser.Type
      • getServerInstance

        public ServerInstance getServerInstance​(LDAPUser.Type authType)
        Get the instance from server group, which is defined as default.
        Specified by:
        getServerInstance in interface IDSConfigMgr
        Parameters:
        authType - The auth type is the privilege that the user in the configuration must have.
        Returns:
        ServerInstance The server instance object that holds the server configuration information.
        See Also:
        LDAPUser.Type