/** * Returns a list of all the hostnames in this ldap url. * * @return ldap url hostnames */ public String[] getHostnames() { final String[] entries = new String[ldapEntries.size()]; for (int i = 0; i < ldapEntries.size(); i++) { entries[i] = ldapEntries.get(i).getHostname(); } return entries; }
/** * Returns a list of all the hostnames in this ldap url. * * @return ldap url hostnames */ public String[] getHostnames() { final String[] entries = new String[ldapEntries.size()]; for (int i = 0; i < ldapEntries.size(); i++) { entries[i] = ldapEntries.get(i).getHostname(); } return entries; }
/** * Returns a list of all the hostnames in this ldap url. * * @return ldap url hostnames */ public String[] getHostnames() { final String[] entries = new String[ldapEntries.size()]; for (int i = 0; i < ldapEntries.size(); i++) { entries[i] = ldapEntries.get(i).getHostname(); } return entries; }
for (String url : urls) { final LdapURL ldapUrl = new LdapURL(url); if (ldapUrl.getEntry().getHostname() == null) { continue;
final String hostname = getHostname(); if (hostname != null) {
final String hostname = getHostname(); if (hostname != null) {
for (String url : urls) { final LdapURL ldapUrl = new LdapURL(url); if (ldapUrl.getEntry().getHostname() == null) { continue;
for (String url : urls) { final LdapURL ldapUrl = new LdapURL(url); if (ldapUrl.getEntry().getHostname() == null) { continue;
ldapConnectionConfig.setLdapHost(ldapUrl.getLastEntry().getHostname()); ldapConnectionConfig.setLdapPort(ldapUrl.getLastEntry().getPort());
final String hostname = getHostname(); if (hostname != null) {
hostnames[i] = entries[i].getHostname();
/** * Compare all the properties of the supplied entries. * * @param entry1 to compare * @param entry2 to compare */ private void compareEntries(final LdapURL.Entry entry1, final LdapURL.Entry entry2) { Assert.assertEquals(entry1.getScheme(), entry2.getScheme()); Assert.assertEquals(entry1.getHostname(), entry2.getHostname()); Assert.assertEquals(entry1.getPort(), entry2.getPort()); Assert.assertEquals(entry1.getBaseDn(), entry2.getBaseDn()); Assert.assertEquals(entry1.getAttributes(), entry2.getAttributes()); Assert.assertEquals(entry1.getScope(), entry2.getScope()); Assert.assertEquals(entry1.getFilter(), entry2.getFilter()); } }
/** * Returns the scheme://hostname:port. * * @return scheme://hostname:port */ public String getHostnameWithSchemeAndPort() { return String.format("%s://%s:%s", getScheme(), getHostname(), getPort()); }
/** * Returns the scheme://hostname:port. * * @return scheme://hostname:port */ public String getHostnameWithSchemeAndPort() { return String.format("%s://%s:%s", getScheme(), getHostname(), getPort()); }
/** * Returns the hostname:port. * * @return hostname:port */ public String getHostnameWithPort() { return String.format("%s:%s", getHostname(), getPort()); }
/** * Returns the hostname:port. * * @return hostname:port */ public String getHostnameWithPort() { return String.format("%s:%s", getHostname(), getPort()); }
/** * Returns the scheme://hostname:port. * * @return scheme://hostname:port */ public String getHostnameWithSchemeAndPort() { return String.format("%s://%s:%s", getScheme(), getHostname(), getPort()); }
/** * Returns the hostname:port. * * @return hostname:port */ public String getHostnameWithPort() { return String.format("%s:%s", getHostname(), getPort()); }