public abstract class BundleResourceHandler extends URLStreamHandler implements ProtocolActivator
Modifier and Type | Field and Description |
---|---|
static String |
BID_FWKID_SEPARATOR |
protected BundleEntry |
bundleEntry |
static String |
SECURITY_CHECKED |
static String |
SECURITY_UNCHECKED |
Constructor and Description |
---|
BundleResourceHandler()
Constructor for a bundle protocol resource URLStreamHandler.
|
BundleResourceHandler(BundleEntry bundleEntry,
BaseAdaptor adaptor) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkAuthorization(Bundle bundle) |
protected boolean |
equals(URL url1,
URL url2) |
protected abstract BundleEntry |
findBundleEntry(URL url,
AbstractBundle bundle)
Finds the bundle entry for this protocal.
|
protected static BaseClassLoader |
getBundleClassLoader(AbstractBundle bundle) |
protected InetAddress |
getHostAddress(URL url) |
protected int |
hashCode(URL url) |
protected boolean |
hostsEqual(URL url1,
URL url2) |
protected URLConnection |
openConnection(URL url)
Establishes a connection to the resource specified by
URL . |
protected void |
parseURL(URL url,
String str,
int start,
int end)
Parse reference URL.
|
protected boolean |
sameFile(URL url1,
URL url2) |
void |
start(BundleContext context,
FrameworkAdaptor baseAdaptor) |
protected String |
toExternalForm(URL url)
Converts a bundle URL to a String.
|
getDefaultPort, openConnection, setURL, setURL
public static final String SECURITY_CHECKED
public static final String SECURITY_UNCHECKED
public static final String BID_FWKID_SEPARATOR
protected BundleEntry bundleEntry
public BundleResourceHandler()
public BundleResourceHandler(BundleEntry bundleEntry, BaseAdaptor adaptor)
public void start(BundleContext context, FrameworkAdaptor baseAdaptor)
start
in interface ProtocolActivator
protected void parseURL(URL url, String str, int start, int end)
parseURL
in class URLStreamHandler
protected URLConnection openConnection(URL url) throws IOException
URL
.
Since different protocols may have unique ways of connecting, it must be
overridden by the subclass.openConnection
in class URLStreamHandler
url
- java.net.URLIOException
- thrown if an IO error occurs during connection establishmentprotected abstract BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException
url
- The URL to find the BundleEntry for.IOException
protected String toExternalForm(URL url)
toExternalForm
in class URLStreamHandler
url
- the URL.protected int hashCode(URL url)
hashCode
in class URLStreamHandler
protected boolean equals(URL url1, URL url2)
equals
in class URLStreamHandler
protected InetAddress getHostAddress(URL url)
getHostAddress
in class URLStreamHandler
protected boolean hostsEqual(URL url1, URL url2)
hostsEqual
in class URLStreamHandler
protected boolean sameFile(URL url1, URL url2)
sameFile
in class URLStreamHandler
protected boolean checkAuthorization(Bundle bundle)
protected static BaseClassLoader getBundleClassLoader(AbstractBundle bundle)
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.