|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.net.DfcStreamHandlerFactory
public class DfcStreamHandlerFactory
Generic implementation of URLStreamHandlerFactory
that supports dynamic registration of protocol handlers.
Method Summary | |
---|---|
URLStreamHandler |
createURLStreamHandler(String protocol)
|
static DfcStreamHandlerFactory |
getInstance()
Get the singleton instance of this class. |
protected static void |
maybeRegisterFactory()
Register the singleton instance of this class as the system-wide URL handler factory. |
void |
registerHandler(String protocol,
URLStreamHandler handler)
Register a handler for a given protocol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DfcStreamHandlerFactory getInstance()
public void registerHandler(String protocol, URLStreamHandler handler) throws UnsupportedOperationException
protocol
- The protocol to handle (ie the "xxx:" part of the
URL).handler
- The instance that will be returned as the handler
for the protocol.
UnsupportedOperationException
- if registration fails
(probably because something else has already registered itself as
a handler factory).public URLStreamHandler createURLStreamHandler(String protocol)
createURLStreamHandler
in interface URLStreamHandlerFactory
protected static void maybeRegisterFactory() throws UnsupportedOperationException
UnsupportedOperationException
- if another factory is
already registered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |