|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.net.URLStreamHandler dsto.dfc.net.streams.search.Handler
public class Handler
A URLStreamHandler that acts as a proxy for a set of named
URLSearchPath's. This allows use of indirect "search:" URL's which
can be resolved dynamically by searching a set of base URL's
(defined by a URLSearchPath
. The name of the
search path is selected via the host part of the URL: eg
search://[search_path]/[relative_path]
.
Method Summary | |
---|---|
static Handler |
getInstance()
|
static URLSearchPath |
getSearchPath(String searchPathName)
The search path registered for a given name. |
URLConnection |
openConnection(URL url)
|
static void |
registerHandler()
Register this class as the handler for the "search:" URL protocol. |
static void |
registerSearchPath(String searchPathName,
URLSearchPath searchPath)
Register a search path for a given name. |
Methods inherited from class java.net.URLStreamHandler |
---|
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Handler getInstance()
public static void registerHandler() throws UnsupportedOperationException
UnsupportedOperationException
- if part of the
registration fails (probably because another URL factory is
already installed). This does not necessarily mean that the
handler is not installed at all since two methods are used
(factory and registration via the java.protocol.handler.pkgs
system property).public static URLSearchPath getSearchPath(String searchPathName)
public static void registerSearchPath(String searchPathName, URLSearchPath searchPath)
searchPathName
- The search path name. URL's of the form
search://[name]/...
will be resolved against
searchPath
.searchPath
- The search path to associated with
searchPathName
public URLConnection openConnection(URL url) throws IOException
openConnection
in class URLStreamHandler
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |