|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.jmx.framework.Framework
public class Framework
Framework represents FrameworkMBean
implementation.
FrameworkMBean
Field Summary |
---|
Fields inherited from interface org.osgi.jmx.framework.FrameworkMBean |
---|
BATCH_ACTION_RESULT_TYPE, BATCH_INSTALL_RESULT_TYPE, BUNDLE_IN_ERROR, BUNDLE_IN_ERROR_ID_ITEM, BUNDLE_IN_ERROR_LOCATION_ITEM, COMPLETED, COMPLETED_ITEM, ERROR, ERROR_ITEM, OBJECTNAME, REMAINING, REMAINING_ID_ITEM, REMAINING_LOCATION_ITEM, SUCCESS, SUCCESS_ITEM |
Constructor Summary | |
---|---|
Framework(org.osgi.framework.BundleContext context,
org.osgi.service.startlevel.StartLevel startLevel,
org.osgi.service.packageadmin.PackageAdmin packageAdmin)
Constructs new FrameworkMBean. |
Method Summary | |
---|---|
InputStream |
createStream(String url)
|
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(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. |
void |
refreshBundles(long[] bundleIdentifiers)
Force the update, replacement or removal of the packages 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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Framework(org.osgi.framework.BundleContext context, org.osgi.service.startlevel.StartLevel startLevel, org.osgi.service.packageadmin.PackageAdmin packageAdmin)
context
- bundle context of jmx bundle.startLevel
- @see StartLevel
service reference.packageAdmin
- @see PackageAdmin
service reference.Method Detail |
---|
public int getFrameworkStartLevel() throws IOException
FrameworkMBean
getFrameworkStartLevel
in interface FrameworkMBean
IOException
- if the operation failedFrameworkMBean.getFrameworkStartLevel()
public int getInitialBundleStartLevel() throws IOException
FrameworkMBean
getInitialBundleStartLevel
in interface FrameworkMBean
IOException
- if the operation failedFrameworkMBean.getInitialBundleStartLevel()
public long installBundle(String location) throws IOException
FrameworkMBean
installBundle
in interface FrameworkMBean
location
- the location of the bundle to install
IOException
- if the operation does not succeedFrameworkMBean.installBundle(java.lang.String)
public long installBundleFromURL(String location, String url) throws IOException
FrameworkMBean
installBundleFromURL
in interface FrameworkMBean
location
- the location to assign to the bundleurl
- the URL which will supply the bytes for the bundle
IOException
- if the operation does not succeedFrameworkMBean.installBundleFromURL(String, String)
public InputStream createStream(String url) throws IOException
IOException
public CompositeData installBundles(String[] locations) throws IOException
FrameworkMBean
installBundles
in interface FrameworkMBean
locations
- the array of locations of the bundles to install
IOException
- if the operation does not succeedFrameworkMBean.installBundles(java.lang.String[])
public CompositeData installBundlesFromURL(String[] locations, String[] urls) throws IOException
FrameworkMBean
installBundlesFromURL
in interface FrameworkMBean
locations
- the array of locations to assign to the installed
bundlesurls
- the array of urls which supply the bundle bytes
IOException
- if the operation does not succeedFrameworkMBean.installBundlesFromURL(String[], String[])
public void refreshBundle(long bundleIdentifier) throws IOException
FrameworkMBean
refreshBundle
in interface FrameworkMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation failedFrameworkMBean.refreshBundle(long)
public void refreshBundles(long[] bundleIdentifiers) throws IOException
FrameworkMBean
refreshBundles
in interface FrameworkMBean
bundleIdentifiers
- The identifiers of the bundles to refresh, or
null
for all bundles with packages pending removal.
IOException
- if the operation failedFrameworkMBean.refreshBundles(long[])
public boolean resolveBundle(long bundleIdentifier) throws IOException
FrameworkMBean
resolveBundle
in interface FrameworkMBean
bundleIdentifier
- the bundle identifier
true
if the bundle was resolved, false otherwise
IOException
- if the operation does not succeedFrameworkMBean.resolveBundle(long)
public boolean resolveBundles(long[] bundleIdentifiers) throws IOException
FrameworkMBean
resolveBundles
in interface FrameworkMBean
bundleIdentifiers
- The identifiers of the bundles to resolve, or
null
to resolve all unresolved bundles.
true
if the bundles were resolved, false otherwise
IOException
- if the operation does not succeedFrameworkMBean.resolveBundles(long[])
public void restartFramework() throws IOException
FrameworkMBean
restartFramework
in interface FrameworkMBean
IOException
- if the operation failedFrameworkMBean.restartFramework()
public void setBundleStartLevel(long bundleIdentifier, int newlevel) throws IOException
FrameworkMBean
setBundleStartLevel
in interface FrameworkMBean
bundleIdentifier
- the bundle identifiernewlevel
- the new start level for the bundle
IOException
- if the operation failedFrameworkMBean.setBundleStartLevel(long, int)
public CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels) throws IOException
FrameworkMBean
setBundleStartLevels
in interface FrameworkMBean
bundleIdentifiers
- the array of bundle identifiersnewlevels
- the array of new start level for the bundles
IOException
- if the operation failedFrameworkMBean.setBundleStartLevels(long[], int[])
public void setFrameworkStartLevel(int newlevel) throws IOException
FrameworkMBean
setFrameworkStartLevel
in interface FrameworkMBean
newlevel
- the new start level
IOException
- if the operation failedFrameworkMBean.setFrameworkStartLevel(int)
public void setInitialBundleStartLevel(int newlevel) throws IOException
FrameworkMBean
setInitialBundleStartLevel
in interface FrameworkMBean
newlevel
- the new start level
IOException
- if the operation failedFrameworkMBean.setInitialBundleStartLevel(int)
public void shutdownFramework() throws IOException
FrameworkMBean
shutdownFramework
in interface FrameworkMBean
IOException
- if the operation failedFrameworkMBean.shutdownFramework()
public void startBundle(long bundleIdentifier) throws IOException
FrameworkMBean
startBundle
in interface FrameworkMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation does not succeedFrameworkMBean.startBundle(long)
public CompositeData startBundles(long[] bundleIdentifiers) throws IOException
FrameworkMBean
startBundles
in interface FrameworkMBean
bundleIdentifiers
- the array of bundle identifiers
IOException
- if the operation does not succeedFrameworkMBean.startBundles(long[])
public void stopBundle(long bundleIdentifier) throws IOException
FrameworkMBean
stopBundle
in interface FrameworkMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation does not succeedFrameworkMBean.stopBundle(long)
public CompositeData stopBundles(long[] bundleIdentifiers) throws IOException
FrameworkMBean
stopBundles
in interface FrameworkMBean
bundleIdentifiers
- the array of bundle identifiers
IOException
- if the operation does not succeedFrameworkMBean.stopBundles(long[])
public void uninstallBundle(long bundleIdentifier) throws IOException
FrameworkMBean
uninstallBundle
in interface FrameworkMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation does not succeedFrameworkMBean.uninstallBundle(long)
public CompositeData uninstallBundles(long[] bundleIdentifiers) throws IOException
FrameworkMBean
uninstallBundles
in interface FrameworkMBean
bundleIdentifiers
- the array of bundle identifiers
IOException
- if the operation does not succeedFrameworkMBean.uninstallBundles(long[])
public void updateBundle(long bundleIdentifier) throws IOException
FrameworkMBean
updateBundle
in interface FrameworkMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation does not succeedFrameworkMBean.updateBundle(long)
public void updateBundleFromURL(long bundleIdentifier, String url) throws IOException
FrameworkMBean
updateBundleFromURL
in interface FrameworkMBean
bundleIdentifier
- the bundle identifierurl
- the URL to use to update the bundle
IOException
- if the operation does not succeedFrameworkMBean.updateBundleFromURL(long, String)
public CompositeData updateBundles(long[] bundleIdentifiers) throws IOException
FrameworkMBean
updateBundles
in interface FrameworkMBean
bundleIdentifiers
- the array of bundle identifiers
IOException
- if the operation does not succeedFrameworkMBean.updateBundles(long[])
public CompositeData updateBundlesFromURL(long[] bundleIdentifiers, String[] urls) throws IOException
FrameworkMBean
updateBundlesFromURL
in interface FrameworkMBean
bundleIdentifiers
- the array of bundle identifiersurls
- the array of URLs to use to update the bundles
IOException
- if the operation does not succeedFrameworkMBean.updateBundlesFromURL(long[], String[])
public void updateFramework() throws IOException
FrameworkMBean
updateFramework
in interface FrameworkMBean
IOException
- if the operation failedFrameworkMBean.updateFramework()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |