| java.lang.Object org.apache.harmony.jndi.provider.GenericURLContext
All known Subclasses: org.apache.harmony.jndi.provider.rmi.rmiURLContext, org.apache.harmony.jndi.provider.ldap.ldapURLContext,
Constructor Summary | |
protected | GenericURLContext() Creates instance of this context with empty environment. | protected | GenericURLContext(Hashtable, ?> environment) Creates instance of this context with specified environment. |
Method Summary | |
public Object | addToEnvironment(String propName, Object propVal) | public void | bind(Name name, Object obj) | public void | bind(String name, Object obj) | public void | close() | public Name | composeName(Name name, Name prefix) | public String | composeName(String name, String prefix) | final protected CannotProceedException | createCannotProceedException(Name name) Lookups the first component (considered a URL) of the specified name
using
GenericURLContext.lookup(String) and wraps it into
CannotProceedException .
Parameters: name - Name to parse. | public Context | createSubcontext(Name name) | public Context | createSubcontext(String name) | final protected static String | decodeURLString(String str) Decodes URL string by transforming URL-encoded characters into their
Unicode character representations.
This method is used by
GenericURLContext.getURLSuffix(String,String) .
Parameters: str - URL or part of URL string. | public void | destroySubcontext(Name name) | public void | destroySubcontext(String name) | protected Context | getContinuationContext(Name name) Lookups the first component (considered a URL) of the specified name
using
GenericURLContext.lookup(String) , wraps it into
CannotProceedException , passes it to
NamingManager.getContinuationContext(CannotProceedException) method and returns the result.
This method is used by
GenericURLContext.lookup(Name) and other public methods
taking
Name as a parameter.
This method uses
GenericURLContext.createCannotProceedException(Name) method.
Parameters: name - Name to parse. | public Hashtable, ?> | getEnvironment() | public String | getNameInNamespace() | public NameParser | getNameParser(Name name) | public NameParser | getNameParser(String name) | abstract protected ResolveResult | getRootURLContext(String url, Hashtable, ?> environment) Determines the proper context from the specified URL and returns the
ResolveResult object with that context as resolved object and the
rest of the URL as remaining name.
This method is used by
GenericURLContext.lookup(String) and other public methods
taking
String name as a parameter.
This method must be overridden by particular URL context implementations.
When overriding make sure that
GenericURLContext.getURLPrefix(String) ,
GenericURLContext.getURLSuffix(String,String) and
GenericURLContext.getRootURLContext(String,Hashtable) methods are in sync in how
they parse URLs.
Parameters: url - URL. Parameters: environment - Environment. | protected String | getURLPrefix(String url) Returns URL prefix, containing scheme name, hostname and port.
This method is only used by
GenericURLContext.rename(String,String) method and
may be overridden by subclasses.
When overriding make sure that
GenericURLContext.getURLPrefix(String) ,
GenericURLContext.getURLSuffix(String,String) and
GenericURLContext.getRootURLContext(String,Hashtable) methods are in sync in how
they parse URLs.
Parameters: url - URL to parse. | protected Name | getURLSuffix(String prefix, String url) Returns URL suffix, containing everything but the
and separating slash, as a
single-component
CompositeName .
This method is only used by
GenericURLContext.rename(String,String) method and
may be overridden by subclasses.
This method uses
GenericURLContext.decodeURLString(String) to decode the suffix
string.
When overriding make sure that
GenericURLContext.getURLPrefix(String) ,
GenericURLContext.getURLSuffix(String,String) and
GenericURLContext.getRootURLContext(String,Hashtable) methods are in sync in how
they parse URLs.
Parameters: prefix - URL prefix, returned by GenericURLContext.getURLPrefix(String)previously called on the same URL. Parameters: url - URL to parse. | public NamingEnumeration<NameClassPair> | list(Name name) | public NamingEnumeration<NameClassPair> | list(String name) | public NamingEnumeration<Binding> | listBindings(Name name) | public NamingEnumeration<Binding> | listBindings(String name) | public Object | lookup(Name name) | public Object | lookup(String name) | public Object | lookupLink(Name name) | public Object | lookupLink(String name) | public void | rebind(Name name, Object obj) | public void | rebind(String name, Object obj) | public Object | removeFromEnvironment(String propName) | public void | rename(Name oldName, Name newName) This method uses
GenericURLContext.urlEquals(String,String) to compare URL
prefixes of the names. | public void | rename(String oldName, String newName) This method uses
GenericURLContext.getURLPrefix(String) and
GenericURLContext.getURLSuffix(String,String) methods to parse string names, and
also uses
GenericURLContext.urlEquals(String,String) to compare URL prefixes of
the names. | public void | unbind(Name name) | public void | unbind(String name) | protected boolean | urlEquals(String url1, String url2) Compares two URLs for equality.
Implemented here as url1.equals(url2) . |
GenericURLContext | protected GenericURLContext()(Code) | | Creates instance of this context with empty environment.
|
GenericURLContext | protected GenericURLContext(Hashtable, ?> environment)(Code) | | Creates instance of this context with specified environment.
Parameters: environment - Environment to copy. |
close | public void close()(Code) | | |
|
|