public abstract class URLStreamHandlerFactorySpi extends Object implements URLStreamHandlerFactory
ServiceLoader
APIs using the META-INF/services
mechanism in the URLFactory
implementation.
URLStreamHandlerFactory
is a singleton that is registered using the
static method
URL#setURLStreamHandlerFactory(URLStreamHandlerFactory)
. Also,
the URL
objects can only be created for the following protocols:
-- http, https, file, ftp, and jar. In order to install protocol handlers
for other protocols, one has to hijack or override the system's singleton
URLStreamHandlerFactory
instance with a custom implementation. The
objective of this class is to make the URLStreamHandler
registration
for other protocols such as ws, wss, etc. feasible without hijacking the
system's URLStreamHandlerFactory
.
Constructor and Description |
---|
URLStreamHandlerFactorySpi() |
Modifier and Type | Method and Description |
---|---|
abstract Collection<String> |
getSupportedProtocols()
Returns a list of supported protocols.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createURLStreamHandler
public abstract Collection<String> getSupportedProtocols()
URLStreamHandler
objects based on the protocol.Copyright © 2015. All Rights Reserved.