Methods Summary |
---|
protected javax.naming.spi.ResolveResult | getRootURLContext(java.lang.String name, java.util.Hashtable env)Resolves 'name' into a target context with remaining name.
It only resolves the hostname/port number. The remaining name
contains the rest of the name found in the URL.
For example, with a corbaname URL
"corbaname:iiop://localhost:900#rest/of/name",
this method resolves "corbaname:iiop://localhost:900" to the "NameService"
context on for the ORB at 'localhost' on port 900,
and returns as the remaining name "rest/of/name".
return corbanameURLContextFactory.getUsingURLIgnoreRest(name, env);
|
protected java.lang.String | getURLPrefix(java.lang.String url)Finds the prefix of a corbaname URL.
This is all of the non-string name portion of the URL.
The string name portion always occurs after the '#'
so we just need to look for that.
int start = url.indexOf('#");
if (start < 0) {
return url; // No '#', prefix is the entire URL
}
return url.substring(0, start);
|
protected javax.naming.Name | getURLSuffix(java.lang.String prefix, java.lang.String url)Return the suffix of a corbaname url.
prefix parameter is ignored.
// Rewrite to corbaname url
url = corbanameURLContextFactory.rewriteUrl(url);
try {
IiopUrl parsedUrl = new IiopUrl(url);
return parsedUrl.getCosName();
} catch (MalformedURLException e) {
throw new InvalidNameException(e.getMessage());
}
|