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, setURLpublic 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 ProtocolActivatorprotected void parseURL(URL url, String str, int start, int end)
parseURL in class URLStreamHandlerprotected 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 URLStreamHandlerurl - 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.IOExceptionprotected String toExternalForm(URL url)
toExternalForm in class URLStreamHandlerurl - the URL.protected int hashCode(URL url)
hashCode in class URLStreamHandlerprotected boolean equals(URL url1, URL url2)
equals in class URLStreamHandlerprotected InetAddress getHostAddress(URL url)
getHostAddress in class URLStreamHandlerprotected boolean hostsEqual(URL url1, URL url2)
hostsEqual in class URLStreamHandlerprotected boolean sameFile(URL url1, URL url2)
sameFile in class URLStreamHandlerprotected boolean checkAuthorization(Bundle bundle)
protected static BaseClassLoader getBundleClassLoader(AbstractBundle bundle)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.