public class LdapURL
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LdapURL.Entry
Represents a single LDAP URL entry.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
DEFAULT_DELIMITER
Default delimiter for ldap urls.
|
private java.util.List<LdapURL.Entry> |
ldapEntries
URL entries.
|
static java.lang.String |
NO_DELIMITER
Do not split URL.
|
private static java.util.regex.Pattern |
URL_PATTERN
Pattern to match LDAP URLs.
|
| Constructor and Description |
|---|
LdapURL(java.lang.String url)
Creates a new ldap url.
|
LdapURL(java.lang.String url,
java.lang.String delimiter)
Creates a new ldap url.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<LdapURL.Entry> |
getEntries()
Returns a list of all the ldap url entries in this ldap url.
|
LdapURL.Entry |
getEntry()
Returns the first entry of this ldap url.
|
java.lang.String[] |
getHostnames()
Returns a list of all the hostnames in this ldap url.
|
java.lang.String[] |
getHostnamesWithSchemeAndPort()
Returns a list of all the hostnames including their scheme and port in this ldap url.
|
LdapURL.Entry |
getLastEntry()
Returns the last entry of this ldap url.
|
java.lang.String[] |
getUrls()
Returns a list of all the URLs in this ldap url.
|
protected LdapURL.Entry |
parseEntry(java.lang.String url)
Matches the supplied url against a pattern and reads it's components.
|
int |
size()
Returns the number of entries in this ldap url.
|
java.lang.String |
toString() |
public static final java.lang.String NO_DELIMITER
private static final java.lang.String DEFAULT_DELIMITER
private static final java.util.regex.Pattern URL_PATTERN
private final java.util.List<LdapURL.Entry> ldapEntries
public LdapURL(java.lang.String url)
url - space delimited list of ldap urlspublic LdapURL(java.lang.String url,
java.lang.String delimiter)
url - space delimited list of ldap urlsdelimiter - to split url withprotected LdapURL.Entry parseEntry(java.lang.String url)
url - to parsepublic LdapURL.Entry getEntry()
public LdapURL.Entry getLastEntry()
public java.util.List<LdapURL.Entry> getEntries()
public java.lang.String[] getUrls()
public java.lang.String[] getHostnamesWithSchemeAndPort()
public java.lang.String[] getHostnames()
public int size()
public java.lang.String toString()
toString in class java.lang.Object