public interface FrameworkMBean
Modifier and Type | Field and Description |
---|---|
static javax.management.openmbean.CompositeType |
BATCH_ACTION_RESULT_TYPE
The Composite Type for a batch action result.
|
static javax.management.openmbean.CompositeType |
BATCH_INSTALL_RESULT_TYPE
The Composite Type which represents the result of a batch install
operation.
|
static javax.management.openmbean.CompositeType |
BATCH_RESOLVE_RESULT_TYPE
The Composite Type which represents the result of a batch resolve
operation.
|
static java.lang.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 java.lang.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 java.lang.String |
ERROR
The key ERROR, used in
ERROR_ITEM . |
static Item |
ERROR_ITEM
The item containing the error message of the batch operation.
|
static java.lang.String |
OBJECTNAME
The Object Name prefix for this mbean.
|
static java.lang.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 java.lang.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
|
java.lang.String |
getProperty(java.lang.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(java.lang.String location)
Install the bundle indicated by the bundleLocations
|
long |
installBundleFromURL(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 |
installBundlesFromURL(java.lang.String[] locations,
java.lang.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.
|
javax.management.openmbean.CompositeData |
refreshBundlesAndWait(long[] bundleIdentifiers)
Force the update, replacement or removal of the packages identified by
the list of bundles and wait until completed.
|
javax.management.openmbean.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
|
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 |
updateBundleFromURL(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 |
updateBundlesFromURL(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.
|
static final java.lang.String OBJECTNAME
static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 javax.management.openmbean.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 javax.management.openmbean.CompositeType BATCH_INSTALL_RESULT_TYPE
installBundles(String[])
and
installBundlesFromURL(String[], String[])
.
This Composite Type consists of the following items:
static final javax.management.openmbean.CompositeType BATCH_RESOLVE_RESULT_TYPE
refreshBundlesAndWait(long[])
and
resolve(long[])
.
This Composite Type consists of the following items:
long[] getDependencyClosure(long[] bundles) throws java.io.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.java.io.IOException
- if the operation failedjava.lang.IllegalArgumentException
- if a bundle indicated does not existint getFrameworkStartLevel() throws java.io.IOException
java.io.IOException
- if the operation failedint getInitialBundleStartLevel() throws java.io.IOException
java.io.IOException
- if the operation failedjava.lang.String getProperty(java.lang.String key) throws java.io.IOException
null
if the property is not found.key
- The name of the requested property.null
if the
property is undefined.java.io.IOException
- if the operation failedlong[] getRemovalPendingBundles() throws java.io.IOException
refreshBundles(long[])
.java.io.IOException
- if the operation failedlong installBundle(java.lang.String location) throws java.io.IOException
location
- the location of the bundle to installjava.io.IOException
- if the operation does not succeedlong installBundleFromURL(java.lang.String location, java.lang.String url) throws java.io.IOException
location
- the location to assign to the bundleurl
- the URL which will supply the bytes for the bundlejava.io.IOException
- if the operation does not succeedjavax.management.openmbean.CompositeData installBundles(java.lang.String[] locations) throws java.io.IOException
locations
- the array of locations of the bundles to installjava.io.IOException
- if the operation does not succeedBATCH_INSTALL_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
javax.management.openmbean.CompositeData installBundlesFromURL(java.lang.String[] locations, java.lang.String[] urls) throws java.io.IOException
locations
- the array of locations to assign to the installed
bundlesurls
- the array of urls which supply the bundle bytesjava.io.IOException
- if the operation does not succeedfor the precise specification of the
CompositeData type representing the returned result.
void refreshBundle(long bundleIdentifier) throws java.io.IOException
bundleIdentifier
- the bundle identifierjava.io.IOException
- if the operation failedjava.lang.IllegalArgumentException
- if the bundle indicated does not existboolean refreshBundleAndWait(long bundleIdentifier) throws java.io.IOException
bundleIdentifier
- the bundle identifierjava.io.IOException
- if the operation failedjava.lang.IllegalArgumentException
- if the bundle indicated does not existvoid refreshBundles(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- The identifiers of the bundles to refresh, or
null
for all bundles with packages pending removal.java.io.IOException
- if the operation failedjava.lang.IllegalArgumentException
- if a bundle indicated does not existjavax.management.openmbean.CompositeData refreshBundlesAndWait(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- The identifiers of the bundles to refresh, or
null
for all bundles with packages pending removal.java.io.IOException
- if the operation failedjava.lang.IllegalArgumentException
- if a bundle indicated does not existfor the precise specification of the
CompositeData type representing the returned result.
boolean resolveBundle(long bundleIdentifier) throws java.io.IOException
bundleIdentifier
- the bundle identifiertrue
if the bundle was resolved, false otherwisejava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if the bundle indicated does not existboolean resolveBundles(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- The identifiers of the bundles to resolve, or
null
to resolve all unresolved bundles.true
if the bundles were resolved, false otherwisejava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if a bundle indicated does not existjavax.management.openmbean.CompositeData resolve(long[] bundleIdentifiers) throws java.io.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.java.io.IOException
- if the operation failedjava.lang.IllegalArgumentException
- if a bundle indicated does not existfor the precise specification of the
CompositeData type representing the returned result.
void restartFramework() throws java.io.IOException
java.io.IOException
- if the operation failedvoid setBundleStartLevel(long bundleIdentifier, int newlevel) throws java.io.IOException
bundleIdentifier
- the bundle identifiernewlevel
- the new start level for the bundlejava.io.IOException
- if the operation failedjavax.management.openmbean.CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels) throws java.io.IOException
bundleIdentifiers
- the array of bundle identifiersnewlevels
- the array of new start level for the bundlesjava.io.IOException
- if the operation failedfor the precise specification of the
CompositeData type representing the returned result.
void setFrameworkStartLevel(int newlevel) throws java.io.IOException
newlevel
- the new start leveljava.io.IOException
- if the operation failedvoid setInitialBundleStartLevel(int newlevel) throws java.io.IOException
newlevel
- the new start leveljava.io.IOException
- if the operation failedvoid shutdownFramework() throws java.io.IOException
java.io.IOException
- if the operation failedvoid startBundle(long bundleIdentifier) throws java.io.IOException
bundleIdentifier
- the bundle identifierjava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if the bundle indicated does not existjavax.management.openmbean.CompositeData startBundles(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- the array of bundle identifiersjava.io.IOException
- if the operation does not succeedfor the precise specification of the
CompositeData type representing the returned result.
void stopBundle(long bundleIdentifier) throws java.io.IOException
bundleIdentifier
- the bundle identifierjava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if the bundle indicated does not existjavax.management.openmbean.CompositeData stopBundles(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- the array of bundle identifiersjava.io.IOException
- 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 java.io.IOException
bundleIdentifier
- the bundle identifierjava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if the bundle indicated does not existjavax.management.openmbean.CompositeData uninstallBundles(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- the array of bundle identifiersjava.io.IOException
- 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 java.io.IOException
bundleIdentifier
- the bundle identifierjava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if the bundle indicated does not existvoid updateBundleFromURL(long bundleIdentifier, java.lang.String url) throws java.io.IOException
bundleIdentifier
- the bundle identifierurl
- the URL to use to update the bundlejava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- if the bundle indicated does not existjavax.management.openmbean.CompositeData updateBundles(long[] bundleIdentifiers) throws java.io.IOException
bundleIdentifiers
- the array of bundle identifiersjava.io.IOException
- if the operation does not succeedBATCH_ACTION_RESULT_TYPE for the precise
specification of the CompositeData type representing the returned
result.
javax.management.openmbean.CompositeData updateBundlesFromURL(long[] bundleIdentifiers, java.lang.String[] urls) throws java.io.IOException
bundleIdentifiers
- the array of bundle identifiersurls
- the array of URLs to use to update the bundlesjava.io.IOException
- if the operation does not succeedjava.lang.IllegalArgumentException
- 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 java.io.IOException
java.io.IOException
- if the operation failedCopyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0