You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/09/18 15:08:33 UTC
svn commit: r1387128 - in
/karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles:
BundlesMBean.java internal/BundlesMBeanImpl.java
Author: jbonofre
Date: Tue Sep 18 13:08:32 2012
New Revision: 1387128
URL: http://svn.apache.org/viewvc?rev=1387128&view=rev
Log:
[KARAF-1822] BundlesMBean supports Bundles attribute for migration purpose
Modified:
karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/BundlesMBean.java
karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/internal/BundlesMBeanImpl.java
Modified: karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/BundlesMBean.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/BundlesMBean.java?rev=1387128&r1=1387127&r2=1387128&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/BundlesMBean.java (original)
+++ karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/BundlesMBean.java Tue Sep 18 13:08:32 2012
@@ -23,29 +23,132 @@ import javax.management.openmbean.Tabula
*/
public interface BundlesMBean {
+ /**
+ * List the bundles.
+ *
+ * @return the list of bundles.
+ * @throws Exception
+ */
+ TabularData getBundles() throws Exception;
+
+ /**
+ * @deprecated use getBundles() instead.
+ */
TabularData list() throws Exception;
+ /**
+ * Get the start level of a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @return the start level of the bundle.
+ * @throws Exception
+ */
int getStartLevel(String bundleId) throws Exception;
+
+ /**
+ * Set the start level of a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @param bundleStartLevel the new start level of the bundle.
+ * @throws Exception
+ */
void setStartLevel(String bundleId, int bundleStartLevel) throws Exception;
+ /**
+ * Refresh all bundles.
+ *
+ * @throws Exception
+ */
void refresh() throws Exception;
+
+ /**
+ * Refresh a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void refresh(String bundleId) throws Exception;
+ /**
+ * Update a given bundle from its location.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void update(String bundleId) throws Exception;
+
+ /**
+ * Update a given bundle from a given location.
+ *
+ * @param bundleId the bundle ID.
+ * @param location the target location.
+ * @throws Exception
+ */
void update(String bundleId, String location) throws Exception;
+ /**
+ * Resolve the bundle.
+ * @throws Exception
+ */
void resolve() throws Exception;
+
+ /**
+ * Resolve a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void resolve(String bundleId) throws Exception;
+ /**
+ * Restart the given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void restart(String bundleId) throws Exception;
+ /**
+ * Install a bundle at a given URL.
+ *
+ * @param url the bundle URL.
+ * @return the bundle ID.
+ * @throws Exception
+ */
long install(String url) throws Exception;
+
+ /**
+ * Install a bundle at a given URL and start the bundle.
+ *
+ * @param url the bundle URL.
+ * @param start true to start the bundle, false else.
+ * @return the bundle ID.
+ * @throws Exception
+ */
long install(String url, boolean start) throws Exception;
+ /**
+ * Start a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void start(String bundleId) throws Exception;
+ /**
+ * Stop a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void stop(String bundleId) throws Exception;
+ /**
+ * Uninstall a given bundle.
+ *
+ * @param bundleId the bundle ID.
+ * @throws Exception
+ */
void uninstall(String bundleId) throws Exception;
}
Modified: karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/internal/BundlesMBeanImpl.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/internal/BundlesMBeanImpl.java?rev=1387128&r1=1387127&r2=1387128&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/internal/BundlesMBeanImpl.java (original)
+++ karaf/branches/karaf-2.3.x/management/mbeans/bundles/src/main/java/org/apache/karaf/management/mbeans/bundles/internal/BundlesMBeanImpl.java Tue Sep 18 13:08:32 2012
@@ -41,7 +41,7 @@ public class BundlesMBeanImpl extends St
super(BundlesMBean.class);
}
- public TabularData list() throws Exception {
+ public TabularData getBundles() throws Exception {
ServiceReference startLevelReference = bundleContext.getServiceReference(StartLevel.class.getName());
StartLevel startLevel = null;
if (startLevelReference != null) {
@@ -90,6 +90,13 @@ public class BundlesMBeanImpl extends St
return table;
}
+ /**
+ * @deprecated use getBundles() instead.
+ */
+ public TabularData list() throws Exception {
+ return getBundles();
+ }
+
public int getStartLevel(String bundleId) throws Exception {
ServiceReference startLevelReference = bundleContext.getServiceReference(StartLevel.class.getName());
if (startLevelReference == null) {