org.osgi.jmx.core
Interface FrameworkMBean


public interface FrameworkMBean

Author:
Hal Hildebrand Date: Nov 23, 2008 Time: 5:39:41 PM The FrameworkMbean provides mechanisms to exert control over the framework. For many operations, it provides a batch mechanism to avoid excessive message passing when interacting remotely.

Field Summary
static java.lang.String[] BUNDLE_ACTION_RESULT
          The item names in the CompositeData representing the result of a batch operation
static java.lang.String BUNDLE_BATCH_ACTION_RESULT
          The name of the CompositeType which represents the result of a batch operation
static java.lang.String BUNDLE_BATCH_INSTALL_RESULT
          The name of the CompositeType which represents the result of a batch install operation
static java.lang.String BUNDLE_COMPLETED
          The name of the item containing the list of bundles completing the batch operation in the CompositeData
static java.lang.String BUNDLE_ERROR_MESSAGE
          The name of the item containing the error message of the batch operation in the CompositeData
static java.lang.String BUNDLE_IN_ERROR
          The name of the item containing the bundle which caused the error during the batch operation in the CompositeData
static java.lang.String BUNDLE_REMAINING
          The name of the item containing the list of remaing bundles unproccessed by the failing batch operation in the CompositeData
static java.lang.String BUNDLE_SUCCESS
          The name of the item containing the success status of the batch operation in the CompositeData
 
Method Summary
 int getFrameworkStartLevel()
          Retrieve the framework start level
 int getInitialBundleStartLevel()
          Answer the initial start level assigned to a bundle when it is first started
 long installBundle(java.lang.String location)
          Install the bundle indicated by the bundleLocations
 long installBundle(java.lang.String location, java.lang.String url)
          Install the bundle indicated by the bundleLocations
 javax.management.openmbean.CompositeData installBundles(java.lang.String[] locations)
          Batch install the bundles indicated by the list of bundleLocationUrls
 javax.management.openmbean.CompositeData installBundles(java.lang.String[] locations, java.lang.String[] urls)
          Batch install the bundles indicated by the list of bundleLocationUrls
 void refreshPackages(long bundleIdentifier)
          Force the update, replacement or removal of the pacakges identified by the list of bundles
 javax.management.openmbean.CompositeData refreshPackages(long[] bundleIdentifiers)
          Force the update, replacement or removal of the pacakges identified by the list of bundles
 boolean resolveBundle(long bundleIdentifier)
          Resolve the bundle indicated by the unique symbolic name and version
 boolean resolveBundles(long[] bundleIdentifiers)
          Batch resolve the bundles indicated by the list of bundle identifiers
 void restartFramework()
          Restart the framework by updating the system bundle
 void setBundleStartLevel(long bundleIdentifier, int newlevel)
          Set the start level for the bundle identifier
 javax.management.openmbean.CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels)
          Set the start levels for the list of bundles
 void setFrameworkStartLevel(int newlevel)
          Set the start level for the framework
 void setInitialBundleStartLevel(int newlevel)
          Set the initial start level assigned to a bundle when it is first started
 void shutdownFramework()
          Shutdown the framework by stopping the system bundle
 void startBundle(long bundleIdentifier)
          Start the bundle indicated by the bundle identifier
 javax.management.openmbean.CompositeData startBundles(long[] bundleIdentifiers)
          Batch start the bundles indicated by the list of bundle identifier
 void stopBundle(long bundleIdentifier)
          Stop the bundle indicated by the bundle identifier
 javax.management.openmbean.CompositeData stopBundles(long[] bundleIdentifiers)
          Batch stop the bundles indicated by the list of bundle identifier
 void uninstallBundle(long bundleIdentifier)
          Uninstall the bundle indicated by the bundle identifier
 javax.management.openmbean.CompositeData uninstallBundles(long[] bundleIdentifiers)
          Batch uninstall the bundles indicated by the list of bundle identifiers
 void updateBundle(long bundleIdentifier)
          Update the bundle indicated by the bundle identifier
 void updateBundle(long bundleIdentifier, java.lang.String url)
          Update the bundle identified by the bundle identifier
 javax.management.openmbean.CompositeData updateBundles(long[] bundleIdentifiers)
          Batch update the bundles indicated by the list of bundle identifier
 javax.management.openmbean.CompositeData updateBundles(long[] bundleIdentifiers, java.lang.String[] urls)
          Update the bundle uniquely identified by the bundle symbolic name and version using the contents of the supplied urls
 void updateFramework()
          Update the framework by updating the system bundle
 

Field Detail

BUNDLE_COMPLETED

static final java.lang.String BUNDLE_COMPLETED
The name of the item containing the list of bundles completing the batch operation in the CompositeData

See Also:
Constant Field Values

BUNDLE_ERROR_MESSAGE

static final java.lang.String BUNDLE_ERROR_MESSAGE
The name of the item containing the error message of the batch operation in the CompositeData

See Also:
Constant Field Values

BUNDLE_IN_ERROR

static final java.lang.String BUNDLE_IN_ERROR
The name of the item containing the bundle which caused the error during the batch operation in the CompositeData

See Also:
Constant Field Values

BUNDLE_REMAINING

static final java.lang.String BUNDLE_REMAINING
The name of the item containing the list of remaing bundles unproccessed by the failing batch operation in the CompositeData

See Also:
Constant Field Values

BUNDLE_SUCCESS

static final java.lang.String BUNDLE_SUCCESS
The name of the item containing the success status of the batch operation in the CompositeData

See Also:
Constant Field Values

BUNDLE_ACTION_RESULT

static final java.lang.String[] BUNDLE_ACTION_RESULT
The item names in the CompositeData representing the result of a batch operation


BUNDLE_BATCH_ACTION_RESULT

static final java.lang.String BUNDLE_BATCH_ACTION_RESULT
The name of the CompositeType which represents the result of a batch operation

See Also:
Constant Field Values

BUNDLE_BATCH_INSTALL_RESULT

static final java.lang.String BUNDLE_BATCH_INSTALL_RESULT
The name of the CompositeType which represents the result of a batch install operation

See Also:
Constant Field Values
Method Detail

getFrameworkStartLevel

int getFrameworkStartLevel()
                           throws java.io.IOException
Retrieve the framework start level

Returns:
the framework start level
Throws:
java.io.IOException - if the operation failed

getInitialBundleStartLevel

int getInitialBundleStartLevel()
                               throws java.io.IOException
Answer the initial start level assigned to a bundle when it is first started

Returns:
the start level
Throws:
java.io.IOException - if the operation failed

installBundle

long installBundle(java.lang.String location)
                   throws java.io.IOException
Install the bundle indicated by the bundleLocations

Parameters:
location - - the location of the bundle to install
Returns:
the bundle id the installed bundle
Throws:
java.io.IOException - if the operation does not succeed

installBundle

long installBundle(java.lang.String location,
                   java.lang.String url)
                   throws java.io.IOException
Install the bundle indicated by the bundleLocations

Parameters:
location - - the location to assign to the bundle
url - - the URL which will supply the bytes for the bundle
Returns:
the bundle id the installed bundle
Throws:
java.io.IOException - if the operation does not succeed

installBundles

javax.management.openmbean.CompositeData installBundles(java.lang.String[] locations)
                                                        throws java.io.IOException
Batch install the bundles indicated by the list of bundleLocationUrls

Parameters:
locations - - the array of locations of the bundles to install
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
See Also:
BatchBundleResult for the precise specification of the CompositeData type representing the returned result.


installBundles

javax.management.openmbean.CompositeData installBundles(java.lang.String[] locations,
                                                        java.lang.String[] urls)
                                                        throws java.io.IOException
Batch install the bundles indicated by the list of bundleLocationUrls

Parameters:
locations - - the array of locations to assign to the installed bundles
urls - - the array of urls which supply the bundle bytes
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
See Also:
BatchBundleResult for the precise specification of the CompositeData type representing the returned result.


refreshPackages

void refreshPackages(long bundleIdentifier)
                     throws java.io.IOException
Force the update, replacement or removal of the pacakges identified by the list of bundles

Parameters:
bundleIdentifier - - the bundle identifier
Throws:
java.io.IOException - if the operation failed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


refreshPackages

javax.management.openmbean.CompositeData refreshPackages(long[] bundleIdentifiers)
                                                         throws java.io.IOException
Force the update, replacement or removal of the pacakges identified by the list of bundles

Parameters:
bundleIdentifiers - - the array of bundle identifiers
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation failed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


resolveBundle

boolean resolveBundle(long bundleIdentifier)
                      throws java.io.IOException
Resolve the bundle indicated by the unique symbolic name and version

Parameters:
bundleIdentifier - - the bundle identifier
Returns:
true if the bundle was resolved, false otherwise
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist

resolveBundles

boolean resolveBundles(long[] bundleIdentifiers)
                       throws java.io.IOException
Batch resolve the bundles indicated by the list of bundle identifiers

Parameters:
bundleIdentifiers - = the identifiers of the bundles to resolve
Returns:
true if the bundles were resolved, false otherwise
Throws:
java.io.IOException - if the operation does not succeed

restartFramework

void restartFramework()
                      throws java.io.IOException
Restart the framework by updating the system bundle

Throws:
java.io.IOException - if the operation failed

setBundleStartLevel

void setBundleStartLevel(long bundleIdentifier,
                         int newlevel)
                         throws java.io.IOException
Set the start level for the bundle identifier

Parameters:
bundleIdentifier - - the bundle identifier
newlevel - - the new start level for the bundle
Throws:
java.io.IOException - if the operation failed

setBundleStartLevels

javax.management.openmbean.CompositeData setBundleStartLevels(long[] bundleIdentifiers,
                                                              int[] newlevels)
                                                              throws java.io.IOException
Set the start levels for the list of bundles

Parameters:
bundleIdentifiers - - the array of bundle identifiers
newlevels - - the array of new start level for the bundles
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation failed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


setFrameworkStartLevel

void setFrameworkStartLevel(int newlevel)
                            throws java.io.IOException
Set the start level for the framework

Parameters:
newlevel - - the new start level
Throws:
java.io.IOException - if the operation failed

setInitialBundleStartLevel

void setInitialBundleStartLevel(int newlevel)
                                throws java.io.IOException
Set the initial start level assigned to a bundle when it is first started

Parameters:
newlevel - - the new start level
Throws:
java.io.IOException - if the operation failed

shutdownFramework

void shutdownFramework()
                       throws java.io.IOException
Shutdown the framework by stopping the system bundle

Throws:
java.io.IOException - if the operation failed

startBundle

void startBundle(long bundleIdentifier)
                 throws java.io.IOException
Start the bundle indicated by the bundle identifier

Parameters:
bundleIdentifier - - the bundle identifier
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist

startBundles

javax.management.openmbean.CompositeData startBundles(long[] bundleIdentifiers)
                                                      throws java.io.IOException
Batch start the bundles indicated by the list of bundle identifier

Parameters:
bundleIdentifiers - - the array of bundle identifiers
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


stopBundle

void stopBundle(long bundleIdentifier)
                throws java.io.IOException
Stop the bundle indicated by the bundle identifier

Parameters:
bundleIdentifier - - the bundle identifier
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist

stopBundles

javax.management.openmbean.CompositeData stopBundles(long[] bundleIdentifiers)
                                                     throws java.io.IOException
Batch stop the bundles indicated by the list of bundle identifier

Parameters:
bundleIdentifiers - - the array of bundle identifiers
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


uninstallBundle

void uninstallBundle(long bundleIdentifier)
                     throws java.io.IOException
Uninstall the bundle indicated by the bundle identifier

Parameters:
bundleIdentifier - - the bundle identifier
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist

uninstallBundles

javax.management.openmbean.CompositeData uninstallBundles(long[] bundleIdentifiers)
                                                          throws java.io.IOException
Batch uninstall the bundles indicated by the list of bundle identifiers

Parameters:
bundleIdentifiers - - the array of bundle identifiers
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


updateBundle

void updateBundle(long bundleIdentifier)
                  throws java.io.IOException
Update the bundle indicated by the bundle identifier

Parameters:
bundleIdentifier - - the bundle identifier
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist

updateBundle

void updateBundle(long bundleIdentifier,
                  java.lang.String url)
                  throws java.io.IOException
Update the bundle identified by the bundle identifier

Parameters:
bundleIdentifier - - the bundle identifier
url - - the URL to use to update the bundle
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist

updateBundles

javax.management.openmbean.CompositeData updateBundles(long[] bundleIdentifiers)
                                                       throws java.io.IOException
Batch update the bundles indicated by the list of bundle identifier

Parameters:
bundleIdentifiers - - the array of bundle identifiers
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


updateBundles

javax.management.openmbean.CompositeData updateBundles(long[] bundleIdentifiers,
                                                       java.lang.String[] urls)
                                                       throws java.io.IOException
Update the bundle uniquely identified by the bundle symbolic name and version using the contents of the supplied urls

Parameters:
bundleIdentifiers - - the array of bundle identifiers
urls - - the array of URLs to use to update the bundles
Returns:
the resulting state from executing the operation
Throws:
java.io.IOException - if the operation does not succeed
java.lang.IllegalArgumentException - if the bundle indicated does not exist
See Also:
BundleBatchActionResult for the precise specification of the CompositeData type representing the returned result.


updateFramework

void updateFramework()
                     throws java.io.IOException
Update the framework by updating the system bundle

Throws:
java.io.IOException - if the operation failed


Copyright © 2009. All Rights Reserved.