- java.lang.Object
-
- aeonics.Protocols
-
- All Implemented Interfaces:
java.net.URLStreamHandlerFactory
public class Protocols extends java.lang.Object implements java.net.URLStreamHandlerFactoryThis class can be used to register multiple protocol schemes usable via theURLclass. This is because an application can only callURL.setURLStreamHandlerFactory(URLStreamHandlerFactory)once which is not compatible with a modular system that needs to register multiple protocols.
-
-
Constructor Summary
Constructors Constructor Description Protocols()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URLStreamHandlercreateURLStreamHandler(java.lang.String protocol)static voidregister(java.lang.String protocol, java.net.URLStreamHandler handler)Registers a new protocol schemestatic voidunregister(java.lang.String protocol)Unregisters a protocol scheme
-
-
-
Method Detail
-
createURLStreamHandler
public java.net.URLStreamHandler createURLStreamHandler(java.lang.String protocol)
- Specified by:
createURLStreamHandlerin interfacejava.net.URLStreamHandlerFactory
-
register
public static void register(java.lang.String protocol, java.net.URLStreamHandler handler)Registers a new protocol scheme- Parameters:
protocol- the protocol name (i.e.: for "http://" the protocol is "http")handler- the URLStreamHandler to handle the protocol
-
unregister
public static void unregister(java.lang.String protocol)
Unregisters a protocol scheme- Parameters:
protocol- the protocol name (i.e.: for "http://" the protocol is "http")
-
-