Top Fields Constructors Methods
com.sun.jndi.ldap

public final Class LdapURL

extends Uri
Class Inheritance
Imports
javax.naming.*, java.net.MalformedURLException, .URI, java.io.UnsupportedEncodingException, java.security.AccessController, .PrivilegedAction, java.util.Locale, .StringTokenizer, com.sun.jndi.toolkit.url.Uri, .UrlUtil

Field Summary

Modifier and TypeField and Description
private String
private static final Uri.ParseMode
private String
private String
private String
public static final Uri.ParseMode
private static final String
private String
private boolean
Inherited from com.sun.jndi.toolkit.url.Uri:
fragmenthasAuthorityhostpathportqueryschemeuri

Constructor Summary

AccessConstructor and Description
public
LdapURL(String url)

Creates an LdapURL object from an LDAP URL string.

Method Summary

Modifier and TypeMethod and Description
public static String[]
fromList(String urlList)

Given a space-separated list of LDAP URLs, returns an array of strings.

public String
getAttributes()

Returns the LDAP URL's attributes.

public String
getDN()

Returns the LDAP URL's distinguished name.

public String
getExtensions()

Returns the LDAP URL's extensions.

public String
getFilter()

Returns the LDAP URL's filter.

public String
getScope()

Returns the LDAP URL's scope.

public static boolean
hasQueryComponents(String url)

Determines whether an LDAP URL has query components.

public static boolean
protected boolean
isSchemeOnly(String
An URI string
uri
)

Overrides com.sun.jndi.toolkit.url.Uri.isSchemeOnly.

A subclass of Uri that supports scheme only URIs can override this method and return true in the case where the URI string is a scheme-only URI that the subclass supports.
protected MalformedURLException
newInvalidURISchemeException(String
the URI string
uri
)

Overrides com.sun.jndi.toolkit.url.Uri.newInvalidURISchemeException.

Creates a MalformedURLException to be thrown when the URI scheme is not supported.
protected Uri.ParseMode
parseMode()

Overrides com.sun.jndi.toolkit.url.Uri.parseMode.

The parse mode for parsing this URI.
private void
pack-priv static String
toUrlString(String host, int port, String dn, boolean useSsl)

public boolean
useSsl()

Returns true if the URL is an LDAPS URL.

public static String
Inherited from com.sun.jndi.toolkit.url.Uri:
acceptsFragmentcheckSchemeOnlygetHostgetPathgetPortgetQuerygetSchemeinittoString

Field Detail

attributesback to summary
private String attributes
DEFAULT_PARSE_MODEback to summary
private static final Uri.ParseMode DEFAULT_PARSE_MODE
DNback to summary
private String DN
extensionsback to summary
private String extensions
filterback to summary
private String filter
PARSE_MODEback to summary
public static final Uri.ParseMode PARSE_MODE
PARSE_MODE_PROPback to summary
private static final String PARSE_MODE_PROP
scopeback to summary
private String scope
useSslback to summary
private boolean useSsl

Constructor Detail

LdapURLback to summary
public LdapURL(String url) throws NamingException

Creates an LdapURL object from an LDAP URL string.

Method Detail

fromListback to summary
public static String[] fromList(String urlList) throws NamingException

Given a space-separated list of LDAP URLs, returns an array of strings.

getAttributesback to summary
public String getAttributes()

Returns the LDAP URL's attributes.

getDNback to summary
public String getDN()

Returns the LDAP URL's distinguished name.

getExtensionsback to summary
public String getExtensions()

Returns the LDAP URL's extensions.

getFilterback to summary
public String getFilter()

Returns the LDAP URL's filter.

getScopeback to summary
public String getScope()

Returns the LDAP URL's scope.

hasQueryComponentsback to summary
public static boolean hasQueryComponents(String url)

Determines whether an LDAP URL has query components.

isLdapSchemeOnlyback to summary
public static boolean isLdapSchemeOnly(String uri)
isSchemeOnlyback to summary
protected boolean isSchemeOnly(String uri)

Overrides com.sun.jndi.toolkit.url.Uri.isSchemeOnly.

Doc from com.sun.jndi.toolkit.url.Uri.isSchemeOnly.

A subclass of Uri that supports scheme only URIs can override this method and return true in the case where the URI string is a scheme-only URI that the subclass supports.

Parameters
uri:String

An URI string

Returns:boolean

if this is a scheme-only URI supported by the subclass

Annotations
@Override
newInvalidURISchemeExceptionback to summary
protected MalformedURLException newInvalidURISchemeException(String uri)

Overrides com.sun.jndi.toolkit.url.Uri.newInvalidURISchemeException.

Doc from com.sun.jndi.toolkit.url.Uri.newInvalidURISchemeException.

Creates a MalformedURLException to be thrown when the URI scheme is not supported.

Parameters
uri:String

the URI string

Returns:MalformedURLException

a MalformedURLException

Annotations
@Override
parseModeback to summary
protected Uri.ParseMode parseMode()

Overrides com.sun.jndi.toolkit.url.Uri.parseMode.

Doc from com.sun.jndi.toolkit.url.Uri.parseMode.

The parse mode for parsing this URI. The default is ParseMode#COMPAT.

Returns:Uri.ParseMode

the parse mode for parsing this URI.

Annotations
@Override
parsePathAndQueryback to summary
private void parsePathAndQuery() throws MalformedURLException, UnsupportedEncodingException
toUrlStringback to summary
pack-priv static String toUrlString(String host, int port, String dn, boolean useSsl)
useSslback to summary
public boolean useSsl()

Returns true if the URL is an LDAPS URL.

validateURIback to summary
public static String validateURI(String uri)