public class LdapURL extends 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 String |
DEFAULT_DELIMITER
Default delimiter for ldap urls.
|
private List<LdapURL.Entry> |
ldapEntries
URL entries.
|
static String |
NO_DELIMITER
Do not split URL.
|
private static Pattern |
URL_PATTERN
Pattern to match LDAP URLs.
|
Constructor and Description |
---|
LdapURL(String url)
Creates a new ldap url.
|
LdapURL(String url,
String delimiter)
Creates a new ldap url.
|
Modifier and Type | Method and Description |
---|---|
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.
|
String[] |
getHostnames()
Returns a list of all the hostnames in this ldap url.
|
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.
|
String[] |
getUrls()
Returns a list of all the URLs in this ldap url.
|
protected LdapURL.Entry |
parseEntry(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.
|
String |
toString() |
public static final String NO_DELIMITER
private static final String DEFAULT_DELIMITER
private static final Pattern URL_PATTERN
private final List<LdapURL.Entry> ldapEntries
public LdapURL(String url)
url
- space delimited list of ldap urlsprotected LdapURL.Entry parseEntry(String url)
url
- to parsepublic LdapURL.Entry getEntry()
public LdapURL.Entry getLastEntry()
public List<LdapURL.Entry> getEntries()
public String[] getUrls()
public String[] getHostnamesWithSchemeAndPort()
public String[] getHostnames()
public int size()
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.