|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FrameworkAdaptor
FrameworkAdaptor interface to the osgi framework. This class is used to provide platform specific support for the osgi framework.
The OSGi framework will call this class to perform platform specific functions. Classes that implement FrameworkAdaptor MUST provide a constructor that takes as a parameter an array of Strings. This array will contain arguments to be handled by the FrameworkAdaptor. The FrameworkAdaptor implementation may define the format and content of its arguments. The constructor should parse the arguments passed to it and remember them. The initialize method should perform the actual processing of the adaptor arguments.
Clients may implement this interface.
Field Summary | |
---|---|
static java.lang.String |
FRAMEWORK_SYMBOLICNAME
|
Method Summary | |
---|---|
void |
compactStorage()
Compact/cleanup the persistent storage for the adaptor. |
BundleData |
createSystemBundleData()
Creates a BundleData object for the System Bundle. |
void |
frameworkStart(BundleContext context)
The framework will call this method after the System BundleActivator.start(BundleContext) has been called. |
void |
frameworkStop(BundleContext context)
The framework will call this method before the System BundleActivator.stop(BundleContext) has been called. |
void |
frameworkStopping(BundleContext context)
The framework will call this method before the process of framework shutdown is started. |
java.lang.ClassLoader |
getBundleClassLoaderParent()
Returns the parent ClassLoader all BundleClassLoaders created. |
BundleWatcher |
getBundleWatcher()
Returns the bundle watcher for this FrameworkAdaptor. |
org.eclipse.osgi.framework.log.FrameworkLog |
getFrameworkLog()
Returns the FrameworkLog for the FrameworkAdaptor. |
int |
getInitialBundleStartLevel()
Returns the initial bundle start level as maintained by this adaptor |
BundleData[] |
getInstalledBundles()
Return a list of the installed bundles. |
PermissionStorage |
getPermissionStorage()
Returns the PermissionStorage object which will be used to to manage the permission data. |
PlatformAdmin |
getPlatformAdmin()
Returns the PlatformAdmin for this FrameworkAdaptor. |
java.util.Properties |
getProperties()
Return the properties object for the adaptor. |
ServiceRegistry |
getServiceRegistry()
Returns the ServiceRegistry object which will be used
to manage ServiceReference bindings. |
State |
getState()
Returns the State for this FrameworkAdaptor. |
long |
getTotalFreeSpace()
Returns the total amount of free space available for bundle storage on the device. |
void |
handleRuntimeError(java.lang.Throwable error)
Handles a RuntimeException or Error that was caught by the Framework and there is not a suitable caller to propagate the Throwable to. |
void |
initialize(EventPublisher eventPublisher)
Initialize the FrameworkAdaptor object so that it is ready to be called by the framework. |
void |
initializeStorage()
Initialize the persistent storage for the adaptor. |
BundleOperation |
installBundle(java.lang.String location,
java.net.URLConnection source)
Prepare to install a bundle from a URLConnection. |
java.net.URLConnection |
mapLocationToURLConnection(java.lang.String location)
Map a location to a URLConnection. |
boolean |
matchDNChain(java.lang.String pattern,
java.lang.String[] dnChain)
Matches the distinguished name chain against a pattern of a distinguished name chain. |
void |
setInitialBundleStartLevel(int value)
Sets the initial bundle start level |
BundleOperation |
uninstallBundle(BundleData bundledata)
Prepare to uninstall a bundle. |
BundleOperation |
updateBundle(BundleData bundledata,
java.net.URLConnection source)
Prepare to update a bundle from a URLConnection. |
Field Detail |
---|
static final java.lang.String FRAMEWORK_SYMBOLICNAME
Method Detail |
---|
void initialize(EventPublisher eventPublisher)
eventPublisher
- The EventPublisher used to publish any events to
the framework.void initializeStorage() throws java.io.IOException
java.io.IOException
- If the adaptor is unable to
initialize the bundle storage.void compactStorage() throws java.io.IOException
java.io.IOException
- If the adaptor is unable to
compact the bundle storage.java.util.Properties getProperties()
BundleData[] getInstalledBundles()
BundleData
. Each BundleData
corresponds to one bundle that is persistently stored.
This method must construct BundleData
objects for all
installed bundles and return an array containing the objects.
The returned array becomes the property of the framework.
java.net.URLConnection mapLocationToURLConnection(java.lang.String location) throws BundleException
location
- of the bundle.
BundleException
- if the mapping fails.BundleOperation installBundle(java.lang.String location, java.net.URLConnection source)
To complete the install,
begin and then commit
must be called on the returned BundleOperation
object.
If either of these methods throw a BundleException
or some other error occurs,
then undo must be called on the BundleOperation
object
to undo the change to persistent storage.
location
- Bundle location.source
- URLConnection from which the bundle may be read.
Any InputStreams returned from the source
(URLConnections.getInputStream) must be closed by the
BundleOperation
object.
BundleOperation updateBundle(BundleData bundledata, java.net.URLConnection source)
To complete the update
begin and then commit
must be called on the returned BundleOperation
object.
If either of these methods throw a BundleException
or some other error occurs,
then undo must be called on the BundleOperation
object
to undo the change to persistent storage.
bundledata
- BundleData to update.source
- URLConnection from which the updated bundle may be read.
Any InputStreams returned from the source
(URLConnections.getInputStream) must be closed by the
BundleOperation
object.
BundleOperation uninstallBundle(BundleData bundledata)
To complete the uninstall,
begin and then commit
must be called on the returned BundleOperation
object.
If either of these methods throw a BundleException
or some other error occurs,
then undo must be called on the BundleOperation
object
to undo the change to persistent storage.
bundledata
- BundleData to uninstall.
long getTotalFreeSpace() throws java.io.IOException
java.io.IOException
- if an I/O error occurs determining the available spacePermissionStorage getPermissionStorage() throws java.io.IOException
java.io.IOException
ServiceRegistry getServiceRegistry()
ServiceRegistry
object which will be used
to manage ServiceReference bindings.
void frameworkStart(BundleContext context) throws BundleException
context
- The System Bundle's BundleContext.
BundleException
- on any error that may occur.void frameworkStop(BundleContext context) throws BundleException
context
- The System Bundle's BundleContext.
BundleException
- on any error that may occur.void frameworkStopping(BundleContext context)
frameworkStop(BundleContext)
method.
context
- The System Bundle's BundleContext.int getInitialBundleStartLevel()
void setInitialBundleStartLevel(int value)
value
- the initial bundle start levelorg.eclipse.osgi.framework.log.FrameworkLog getFrameworkLog()
BundleData createSystemBundleData() throws BundleException
BundleException
- if any error occurs while creating the
System BundleData.BundleWatcher getBundleWatcher()
PlatformAdmin getPlatformAdmin()
This method will not be called until after
frameworkStart(BundleContext)
is called.
State getState()
This method will not be called until after
frameworkStart(BundleContext)
is called.
The State returned is used by the framework to resolve bundle
dependencies.
java.lang.ClassLoader getBundleClassLoaderParent()
void handleRuntimeError(java.lang.Throwable error)
error
- The Throwable for the runtime error that is to be handled.boolean matchDNChain(java.lang.String pattern, java.lang.String[] dnChain)
pattern
- the pattern of distinguished name (DN) chains to match
against the dnChain. Wildcards "*" can be used in three cases:
dnChain
- a distinguished name (DN) chain
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |