Package uk.ac.starlink.util
Class CustomURLStreamHandlerFactory
java.lang.Object
uk.ac.starlink.util.CustomURLStreamHandlerFactory
- All Implemented Interfaces:
URLStreamHandlerFactory
Customisable implementation of
URLStreamHandlerFactory
.
The handlers it can dispense are configured using a map; the keys of
the map are protocol names and its values are the names of classes
which implement URLStreamHandler
(and have no-arg
constructors).- Since:
- 25 Aug 2006
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a no-op handler factory.CustomURLStreamHandlerFactory
(Map<String, String> classMap) Constructs a handler factory initialised with a given protocol->classname map. -
Method Summary
Modifier and TypeMethodDescriptioncreateURLStreamHandler
(String protocol) Returns the protocol->classname map that describes this factory.
-
Constructor Details
-
CustomURLStreamHandlerFactory
public CustomURLStreamHandlerFactory()Constructs a no-op handler factory. -
CustomURLStreamHandlerFactory
Constructs a handler factory initialised with a given protocol->classname map.- Parameters:
classMap
- handler class map
-
-
Method Details
-
getHandlerClassMap
Returns the protocol->classname map that describes this factory. It may be altered to modify behaviour.- Returns:
- handler class map
-
createURLStreamHandler
- Specified by:
createURLStreamHandler
in interfaceURLStreamHandlerFactory
-