Package cloud.piranha.micro
Class StaticURLStreamHandlerFactory
- java.lang.Object
-
- cloud.piranha.micro.StaticURLStreamHandlerFactory
-
- All Implemented Interfaces:
URLStreamHandlerFactory
public class StaticURLStreamHandlerFactory extends Object implements URLStreamHandlerFactory
A factory for URL stream handlers using a static map to contain handlers.This factory should be registered with the JVM early. Later on the
HANDLERS
map can be used to register individual URL stream handlers for various protocols.TODO: use URLStreamHandlerProvider
- Author:
- Arjan Tijms
-
-
Constructor Summary
Constructors Constructor Description StaticURLStreamHandlerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URLStreamHandler
createURLStreamHandler(String protocol)
static Map<String,Function<URL,URLConnection>>
getHandlers()
-
-
-
Method Detail
-
getHandlers
public static Map<String,Function<URL,URLConnection>> getHandlers()
-
createURLStreamHandler
public URLStreamHandler createURLStreamHandler(String protocol)
- Specified by:
createURLStreamHandler
in interfaceURLStreamHandlerFactory
-
-