public interface FrameworkMBean
Modifier and Type | Field and Description |
---|---|
static CompositeType |
BATCH_ACTION_RESULT_TYPE
The Composite Type for a batch action result.
|
static CompositeType |
BATCH_INSTALL_RESULT_TYPE
The Composite Type which represents the result of a batch install
operation.
|
static CompositeType |
BATCH_RESOLVE_RESULT_TYPE
The Composite Type which represents the result of a batch resolve
operation.
|
static String |
BUNDLE_IN_ERROR
The key for BUNDLE_IN_ERROR.
|
static Item |
BUNDLE_IN_ERROR_ID_ITEM
The item containing the bundle which caused the error during the batch
operation.
|
static Item |
BUNDLE_IN_ERROR_LOCATION_ITEM
The item containing the bundle which caused the error during the batch
operation.
|
static String |
COMPLETED
The key COMPLETED, used in
COMPLETED_ITEM . |
static Item |
COMPLETED_ITEM
The item containing the list of bundles completing the batch operation.
|
static String |
ERROR
The key ERROR, used in
ERROR_ITEM . |
static Item |
ERROR_ITEM
The item containing the error message of the batch operation.
|
static String |
OBJECTNAME
The Object Name prefix for this mbean.
|
static String |
REMAINING
The key REMAINING, used in
REMAINING_ID_ITEM and
REMAINING_LOCATION_ITEM . |
static Item |
REMAINING_ID_ITEM
The item containing the list of remaining bundles unprocessed by the
failing batch operation.
|
static Item |
REMAINING_LOCATION_ITEM
The item containing the list of remaining bundles unprocessed by the
failing batch operation.
|
static String |
SUCCESS
The SUCCESS, used in
SUCCESS_ITEM . |
static Item |
SUCCESS_ITEM
The item that indicates if this operation was successful.
|
Modifier and Type | Method and Description |
---|---|
long[] |
getDependencyClosure(long[] bundles)
Returns the dependency closure for the specified bundles.
|
int |
getFrameworkStartLevel()
Retrieve the framework start level
|
int |
getInitialBundleStartLevel()
Answer the initial start level assigned to a bundle when it is first
started
|
String |
getProperty(String key)
Returns the value of the specified property.
|
long[] |
getRemovalPendingBundles()
Returns the bundles IDs that have non-current, in use bundle wirings.
|
long |
installBundle(String location)
Install the bundle indicated by the bundleLocations
|
long |
installBundleFromURL(String location,
String url)
Install the bundle indicated by the bundleLocations
|
CompositeData |
installBundles(String[] locations)
Batch install the bundles indicated by the list of bundleLocationUrls
|
CompositeData |
installBundlesFromURL(String[] locations,
String[] urls)
Batch install the bundles indicated by the list of bundleLocationUrls
|
void |
refreshBundle(long bundleIdentifier)
Force the update, replacement or removal of the packages identified by
the specified bundle.
|
boolean |
refreshBundleAndWait(long bundleIdentifier)
Force the update, replacement or removal of the packages identified by
the specified bundle and wait until completed.
|
void |
refreshBundles(long[] bundleIdentifiers)
Force the update, replacement or removal of the packages identified by
the list of bundles.
|
CompositeData |
refreshBundlesAndWait(long[] bundleIdentifiers)
Force the update, replacement or removal of the packages identified by
the list of bundles and wait until completed.
|
CompositeData |
resolve(long[] bundleIdentifiers)
Same as
resolveBundles(long[]) but with a more detailed return
type. |
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
|
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
|
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
|
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
|
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 |
updateBundleFromURL(long bundleIdentifier,
String url)
Update the bundle identified by the bundle identifier
|
CompositeData |
updateBundles(long[] bundleIdentifiers)
Batch update the bundles indicated by the list of bundle identifier.
|
CompositeData |
updateBundlesFromURL(long[] bundleIdentifiers,
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.
|
static final String OBJECTNAME
static final String SUCCESS
SUCCESS_ITEM
.static final Item SUCCESS_ITEM
SUCCESS
and the type is SimpleType.BOOLEAN
. It is used
in BATCH_ACTION_RESULT_TYPE
and
BATCH_INSTALL_RESULT_TYPE
.static final String ERROR
ERROR_ITEM
.static final Item ERROR_ITEM
ERROR
and the type is SimpleType.STRING
. It is used in
BATCH_ACTION_RESULT_TYPE
and BATCH_INSTALL_RESULT_TYPE
.static final String COMPLETED
COMPLETED_ITEM
.static final Item COMPLETED_ITEM
COMPLETED
and the type is
JmxConstants.LONG_ARRAY_TYPE
. It is used in
BATCH_ACTION_RESULT_TYPE
and BATCH_INSTALL_RESULT_TYPE
.static final String BUNDLE_IN_ERROR
BUNDLE_IN_ERROR_ID_ITEM
and
BUNDLE_IN_ERROR_LOCATION_ITEM
that each have a different type
for this key. It is used in BATCH_ACTION_RESULT_TYPE
and
BATCH_INSTALL_RESULT_TYPE
.static final Item BUNDLE_IN_ERROR_ID_ITEM
BUNDLE_IN_ERROR
and the type is SimpleType.LONG
. It is
used in BATCH_ACTION_RESULT_TYPE
.static final String REMAINING
REMAINING_ID_ITEM
and
REMAINING_LOCATION_ITEM
.static final Item REMAINING_ID_ITEM
REMAINING
and the type is
JmxConstants.LONG_ARRAY_TYPE
. It is used in
BATCH_ACTION_RESULT_TYPE
and BATCH_INSTALL_RESULT_TYPE
.static final CompositeType BATCH_ACTION_RESULT_TYPE
refreshBundle(long)
and refreshBundles(long[])
. Notice
that a batch action result returns uses an id for the
BUNDLE_IN_ERROR
while the BATCH_INSTALL_RESULT_TYPE
uses a location.
This Composite Type consists of the following items:
static final Item BUNDLE_IN_ERROR_LOCATION_ITEM
BUNDLE_IN_ERROR
and the type is SimpleType.STRING
. It
is used in BATCH_INSTALL_RESULT_TYPE
.static final Item REMAINING_LOCATION_ITEM
REMAINING
and the type is
JmxConstants.STRING_ARRAY_TYPE
. It is used in
BATCH_ACTION_RESULT_TYPE
and BATCH_INSTALL_RESULT_TYPE
.static final CompositeType BATCH_INSTALL_RESULT_TYPE
installBundles(String[])
and
installBundlesFromURL(String[], String[])
.
This Composite Type consists of the following items:
static final CompositeType BATCH_RESOLVE_RESULT_TYPE
refreshBundlesAndWait(long[])
and
resolve(long[])
.
This Composite Type consists of the following items:
long[] getDependencyClosure(long[] bundles) throws IOException
A graph of bundles is computed starting with the specified bundles. The
graph is expanded by adding any bundle that is either wired to a package
that is currently exported by a bundle in the graph or requires a bundle
in the graph. The graph is fully constructed when there is no bundle
outside the graph that is wired to a bundle in the graph. The graph may
contain UNINSTALLED
bundles that are
removal pending
.
bundles
- The initial bundles IDs for which to generate the
dependency closure.IOException
- if the operation failedIllegalArgumentException
- if a bundle indicated does not existint getFrameworkStartLevel() throws IOException
IOException
- if the operation failedint getInitialBundleStartLevel() throws IOException
IOException
- if the operation failedString getProperty(String key) throws IOException
null
if the property is not found.key
- The name of the requested property.null
if the
property is undefined.IOException
- if the operation failedlong[] getRemovalPendingBundles() throws IOException
refreshBundles(long[])
.IOException
- if the operation failedlong installBundle(String location) throws IOException
location
- the location of the bundle to installIOException
- if the operation does not succeedlong installBundleFromURL(String location, String url) throws IOException
location
- the location to assign to the bundleurl
- the URL which will supply the bytes for the bundleIOException
- if the operation does not succeedCompositeData installBundles(String[] locations) throws IOException
locations
- the array of locations of the bundles to installIOException
- if the operation does not succeedBATCH_INSTALL_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
CompositeData installBundlesFromURL(String[] locations, String[] urls) throws IOException
locations
- the array of locations to assign to the installed
bundlesurls
- the array of urls which supply the bundle bytesIOException
- if the operation does not succeedfor the precise specification of the
CompositeData type representing the returned result.
void refreshBundle(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifierIOException
- if the operation failedIllegalArgumentException
- if the bundle indicated does not existboolean refreshBundleAndWait(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifierIOException
- if the operation failedIllegalArgumentException
- if the bundle indicated does not existvoid refreshBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- The identifiers of the bundles to refresh, or
null
for all bundles with packages pending removal.IOException
- if the operation failedIllegalArgumentException
- if a bundle indicated does not existCompositeData refreshBundlesAndWait(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- The identifiers of the bundles to refresh, or
null
for all bundles with packages pending removal.IOException
- if the operation failedIllegalArgumentException
- if a bundle indicated does not existfor the precise specification of the
CompositeData type representing the returned result.
boolean resolveBundle(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifiertrue
if the bundle was resolved, false otherwiseIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existboolean resolveBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- The identifiers of the bundles to resolve, or
null
to resolve all unresolved bundles.true
if the bundles were resolved, false otherwiseIOException
- if the operation does not succeedIllegalArgumentException
- if a bundle indicated does not existCompositeData resolve(long[] bundleIdentifiers) throws IOException
resolveBundles(long[])
but with a more detailed return
type.bundleIdentifiers
- The identifiers of the bundles to resolve, or
null
to resolve all unresolved bundles.IOException
- if the operation failedIllegalArgumentException
- if a bundle indicated does not existfor the precise specification of the
CompositeData type representing the returned result.
void restartFramework() throws IOException
IOException
- if the operation failedvoid setBundleStartLevel(long bundleIdentifier, int newlevel) throws IOException
bundleIdentifier
- the bundle identifiernewlevel
- the new start level for the bundleIOException
- if the operation failedCompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels) throws IOException
bundleIdentifiers
- the array of bundle identifiersnewlevels
- the array of new start level for the bundlesIOException
- if the operation failedfor the precise specification of the
CompositeData type representing the returned result.
void setFrameworkStartLevel(int newlevel) throws IOException
newlevel
- the new start levelIOException
- if the operation failedvoid setInitialBundleStartLevel(int newlevel) throws IOException
newlevel
- the new start levelIOException
- if the operation failedvoid shutdownFramework() throws IOException
IOException
- if the operation failedvoid startBundle(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifierIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existCompositeData startBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- the array of bundle identifiersIOException
- if the operation does not succeedfor the precise specification of the
CompositeData type representing the returned result.
void stopBundle(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifierIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existCompositeData stopBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- the array of bundle identifiersIOException
- if the operation does not succeedBATCH_ACTION_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
void uninstallBundle(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifierIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existCompositeData uninstallBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- the array of bundle identifiersIOException
- if the operation does not succeedBATCH_ACTION_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
void updateBundle(long bundleIdentifier) throws IOException
bundleIdentifier
- the bundle identifierIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existvoid updateBundleFromURL(long bundleIdentifier, String url) throws IOException
bundleIdentifier
- the bundle identifierurl
- the URL to use to update the bundleIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existCompositeData updateBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
- the array of bundle identifiersIOException
- if the operation does not succeedBATCH_ACTION_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
CompositeData updateBundlesFromURL(long[] bundleIdentifiers, String[] urls) throws IOException
bundleIdentifiers
- the array of bundle identifiersurls
- the array of URLs to use to update the bundlesIOException
- if the operation does not succeedIllegalArgumentException
- if the bundle indicated does not existBATCH_ACTION_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
void updateFramework() throws IOException
IOException
- if the operation failedCopyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0