org.ldaptive
Class LdapURL

java.lang.Object
  extended by org.ldaptive.LdapURL

public class LdapURL
extends Object

Utility class for parsing LDAP URLs. Supports a space delimited format for representing multiple URLs. Expects :, where the port is optional.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Nested Class Summary
static class LdapURL.Entry
          Represents a single LDAP URL entry.
 
Field Summary
static int DEFAULT_LDAP_PORT
          Default LDAP port, value is 389.
static int DEFAULT_LDAPS_PORT
          Default LDAPS port, value is 636.
 
Constructor Summary
LdapURL(String url)
          Creates a new ldap url.
LdapURL(String url, String delimiter)
          Creates a new ldap url.
 
Method Summary
 List<LdapURL.Entry> getEntries()
          Returns a list of all the ldap url entries in this ldap url.
 String[] getEntriesAsString()
          Returns a list of all the hostnames in this ldap url.
 LdapURL.Entry getEntry()
          Returns the first entry of this ldap url.
 LdapURL.Entry getLastEntry()
          Returns the last entry of this ldap url.
 int size()
          Returns the number of entries in this ldap url.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_LDAP_PORT

public static final int DEFAULT_LDAP_PORT
Default LDAP port, value is 389.

See Also:
Constant Field Values

DEFAULT_LDAPS_PORT

public static final int DEFAULT_LDAPS_PORT
Default LDAPS port, value is 636.

See Also:
Constant Field Values
Constructor Detail

LdapURL

public LdapURL(String url)
Creates a new ldap url.

Parameters:
url - space delimited list of ldap urls

LdapURL

public LdapURL(String url,
               String delimiter)
Creates a new ldap url.

Parameters:
url - space delimited list of ldap urls
delimiter - to split url with
Method Detail

getEntry

public LdapURL.Entry getEntry()
Returns the first entry of this ldap url.

Returns:
first entry

getLastEntry

public LdapURL.Entry getLastEntry()
Returns the last entry of this ldap url.

Returns:
last entry

getEntries

public List<LdapURL.Entry> getEntries()
Returns a list of all the ldap url entries in this ldap url.

Returns:
ldap url entries

getEntriesAsString

public String[] getEntriesAsString()
Returns a list of all the hostnames in this ldap url.

Returns:
ldap url hostnames

size

public int size()
Returns the number of entries in this ldap url.

Returns:
number of entries in this ldap url

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.