com.informix.jns

## Class LdapSqlhosts

- java.lang.Object
- - com.informix.jns.LdapSqlhosts

    public class LdapSqlhosts
    extends java.lang.Object

### Constructor Summary

Constructors
Constructor and Description
`LdapSqlhosts(java.util.Properties sqhenv)` Constructs a LdapSqlhost Object.

### Method Summary

Methods
`void` `destroySqlhosts()` Deletes the SQLHOSTS tree from the LDAP server
`ServerInfo` `getServer(java.lang.String sname)` Gets the ServerInfo given the server name string
`ServerGroup` `getServerGroup(java.lang.String sname)` Gets the ServerGroup given the server group name string
`ServerGroup` `listServers()` Lists all the servers in the SQLHOSTS
`void` `uploadSqlhosts(java.lang.String sqhFilename)` Adds server (serverinfo) entries from the sqlhosts file to the SQLHOSTS tree in the LDAP server

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LdapSqlhosts

    public LdapSqlhosts(java.util.Properties sqhenv)
                 throws IfxJNSException

Constructs a LdapSqlhost Object.

Parameters:
  `sqhenv` - the environement properties list that provides the necessary parameters. Following [optional] properties are defined : "LDAP_URL" --> value 'the ldap url' if SQLH_TYPE is "LDAP" // format == "ldap://host:port" "LDAP_USER" --> value 'the ldap user name' "LDAP_PASSWD" --> value 'the ldap user password' "LDAP_IFXBASE" --> value 'the ldap node dn that is the root for Informix components' "LDAP_SQHRDN" --> value 'the relative ldap dn under LDAP_IFXBASE that is the root for SQLHOSTS' "CLIENT_LOCALE" --> value 'The locale of any exceptions/error messages'
Throws:
  `IfxJNSException`

### Method Detail

#### getServer

    public ServerInfo getServer(java.lang.String sname)
                         throws IfxJNSException

Gets the ServerInfo given the server name string

Parameters:
  `sname` - the server name string
Throws:
  `IfxJNSException`

#### getServerGroup

    public ServerGroup getServerGroup(java.lang.String sname)
                               throws IfxJNSException

Gets the ServerGroup given the server group name string

Parameters:
  `sname` - the server group name string
Throws:
  `IfxJNSException`

#### listServers

    public ServerGroup listServers()
                            throws IfxJNSException

Lists all the servers in the SQLHOSTS

Throws:
  `IfxJNSException`

#### destroySqlhosts

    public void destroySqlhosts()
                         throws IfxJNSException

Deletes the SQLHOSTS tree from the LDAP server

Throws:
  `IfxJNSException`

#### uploadSqlhosts

    public void uploadSqlhosts(java.lang.String sqhFilename)
                        throws IfxJNSException

Adds server (serverinfo) entries from the sqlhosts file to the SQLHOSTS tree in the LDAP server

Parameters:
  `sqhFilename` - the ascii sqlhosts file
Throws:
  `IfxJNSException`