org.apache.felix.ipojo.online.manipulator
Class IPOJOURLHandler
java.lang.Object
java.net.URLStreamHandler
org.osgi.service.url.AbstractURLStreamHandlerService
org.apache.felix.ipojo.online.manipulator.IPOJOURLHandler
- All Implemented Interfaces:
- URLStreamHandlerService
public class IPOJOURLHandler
- extends AbstractURLStreamHandlerService
- implements URLStreamHandlerService
iPOJO URL Handler allowing installation time manipulation.
When a bundle is installed with the ipojo:
URL
prefix, the bundle is downloaded and manipulated by this
handler.
The metadata.xml file can either be provided inside the bundle (root,
or in META-INF) or given in the URL:
ipojo:URL_BUNDLE!URL_METADATA.
- Author:
- Felix Project Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IPOJOURLHandler
public IPOJOURLHandler(BundleContext bc)
- Creates a IPOJOURLHandler.
Gets the bundle context and create the working
directory.
- Parameters:
bc
- the bundle context
stop
public void stop()
- Stops the URL handler:
Deletes the working directory.
openConnection
public URLConnection openConnection(URL url)
throws IOException
- Opens a connection using the ipojo url handler.
This methods parses the URL and manipulate the given bundle.
- Specified by:
openConnection
in interface URLStreamHandlerService
- Specified by:
openConnection
in class AbstractURLStreamHandlerService
- Parameters:
url
- the url.
- Returns:
- the URL connection on the manipulated bundle
- Throws:
IOException
- occurs when the bundle cannot be either downloaded, or manipulated or
installed correctly.- See Also:
AbstractURLStreamHandlerService.openConnection(java.net.URL)
Copyright © 2011 Apache Software Foundation. All Rights Reserved.