Package org.eclipse.osgi.storage.url
Class BundleResourceHandler
java.lang.Object
java.net.URLStreamHandler
org.eclipse.equinox.plurl.PlurlStreamHandlerBase
org.eclipse.osgi.storage.url.BundleResourceHandler
- All Implemented Interfaces:
PlurlStreamHandler
URLStreamHandler the bundleentry and bundleresource protocols.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.equinox.plurl.PlurlStreamHandler
PlurlStreamHandler.PlurlSetter -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected BundleEntryprotected final ModuleContainerstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBundleResourceHandler(ModuleContainer container, BundleEntry bundleEntry) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckAuthorization(Module module) static StringcreateURLHostForBundleID(ModuleContainer container, long bundleId) booleanThis method callssuper.equals(URL,URL).protected abstract BundleEntryfindBundleEntry(URL url, Module module) Finds the bundle entry for this protocal.getHostAddress(URL url) This method callssuper.getHostAddress.intThis method callssuper.hashCode(URL).booleanhostsEqual(URL url1, URL url2) This method callssuper.hostsEqual.openConnection(URL url) Establishes a connection to the resource specified byURL.protected voidParse reference URL.booleanThis method callssuper.sameFile.toExternalForm(URL url) Converts a bundle URL to a String.Methods inherited from class org.eclipse.equinox.plurl.PlurlStreamHandlerBase
getDefaultPort, openConnection, parseURL, setURL, setURL
-
Field Details
-
OSGI_RESOURCE_URL_PROTOCOL
- See Also:
-
OSGI_ENTRY_URL_PROTOCOL
- See Also:
-
SECURITY_CHECKED
- See Also:
-
SECURITY_UNCHECKED
- See Also:
-
BID_FWKID_SEPARATOR
- See Also:
-
container
-
bundleEntry
-
-
Constructor Details
-
BundleResourceHandler
-
-
Method Details
-
parseURL
Parse reference URL.- Overrides:
parseURLin classURLStreamHandler
-
openConnection
Establishes a connection to the resource specified byURL. Since different protocols may have unique ways of connecting, it must be overridden by the subclass.- Specified by:
openConnectionin interfacePlurlStreamHandler- Specified by:
openConnectionin classPlurlStreamHandlerBase- Parameters:
url- java.net.URL- Returns:
- java.net.URLConnection
- Throws:
IOException- thrown if an IO error occurs during connection establishment- See Also:
-
findBundleEntry
Finds the bundle entry for this protocal. This is handled differently for Bundle.gerResource() and Bundle.getEntry() because getResource uses the bundle classloader and getEntry only used the base bundle file.- Parameters:
url- The URL to find the entry for.module- the module to find the entry for.- Returns:
- the bundle entry
- Throws:
IOException
-
toExternalForm
Converts a bundle URL to a String.- Specified by:
toExternalFormin interfacePlurlStreamHandler- Overrides:
toExternalFormin classPlurlStreamHandlerBase- Parameters:
url- the URL.- Returns:
- a string representation of the URL.
- See Also:
-
hashCode
Description copied from class:PlurlStreamHandlerBaseThis method callssuper.hashCode(URL).- Specified by:
hashCodein interfacePlurlStreamHandler- Overrides:
hashCodein classPlurlStreamHandlerBase- See Also:
-
equals
Description copied from class:PlurlStreamHandlerBaseThis method callssuper.equals(URL,URL).- Specified by:
equalsin interfacePlurlStreamHandler- Overrides:
equalsin classPlurlStreamHandlerBase- See Also:
-
getHostAddress
Description copied from class:PlurlStreamHandlerBaseThis method callssuper.getHostAddress.- Specified by:
getHostAddressin interfacePlurlStreamHandler- Overrides:
getHostAddressin classPlurlStreamHandlerBase- See Also:
-
hostsEqual
Description copied from class:PlurlStreamHandlerBaseThis method callssuper.hostsEqual.- Specified by:
hostsEqualin interfacePlurlStreamHandler- Overrides:
hostsEqualin classPlurlStreamHandlerBase- See Also:
-
sameFile
Description copied from class:PlurlStreamHandlerBaseThis method callssuper.sameFile.- Specified by:
sameFilein interfacePlurlStreamHandler- Overrides:
sameFilein classPlurlStreamHandlerBase- See Also:
-
checkAuthorization
-
createURLHostForBundleID
-