[jboss-cvs] JBossAS SVN: r84822 - in projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer: helpers and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 26 14:42:22 EST 2009
Author: alesj
Date: 2009-02-26 14:42:22 -0500 (Thu, 26 Feb 2009)
New Revision: 84822
Added:
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/BundleDeploymentListener.java
Modified:
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/VDFBundleListener.java
Log:
Abstract deployment listener.
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java 2009-02-26 19:26:05 UTC (rev 84821)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java 2009-02-26 19:42:22 UTC (rev 84822)
@@ -30,7 +30,7 @@
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.deployer.helpers.VDFBundleListener;
+import org.jboss.osgi.deployer.helpers.BundleDeploymentListener;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -47,9 +47,9 @@
private BundleContext bundleContext;
private List<URI> skipBundles;
- private VDFBundleListener listener;
+ private BundleDeploymentListener listener;
- public OSGiDeployer(VDFBundleListener listener)
+ public OSGiDeployer(BundleDeploymentListener listener)
{
super(OSGiMetaData.class);
if (listener == null)
Added: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/BundleDeploymentListener.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/BundleDeploymentListener.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/BundleDeploymentListener.java 2009-02-26 19:42:22 UTC (rev 84822)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployer.helpers;
+
+import org.osgi.framework.BundleListener;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * Bundle deployment listener.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public interface BundleDeploymentListener extends BundleListener
+{
+ /**
+ * Map deployment with the bundle.
+ *
+ * @param unit the deployment unit
+ */
+ void addDeployment(DeploymentUnit unit);
+
+ /**
+ * Remove deployment mapping.
+ *
+ * @param unit the deployment unit
+ */
+ void removeDeployment(DeploymentUnit unit);
+}
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/VDFBundleListener.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/VDFBundleListener.java 2009-02-26 19:26:05 UTC (rev 84821)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/VDFBundleListener.java 2009-02-26 19:42:22 UTC (rev 84822)
@@ -32,14 +32,13 @@
import org.jboss.logging.Logger;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleListener;
/**
* MC's VDF based BundleListener.
*
* @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
*/
-public class VDFBundleListener implements BundleListener
+public class VDFBundleListener implements BundleDeploymentListener
{
private static Logger log = Logger.getLogger(VDFBundleListener.class);
private static Map<Integer, DeploymentStage> stages = new HashMap<Integer, DeploymentStage>();
@@ -89,11 +88,6 @@
}
}
- /**
- * Map deployment with the bundle.
- *
- * @param unit the deployment unit
- */
public void addDeployment(DeploymentUnit unit)
{
Bundle bundle = unit.getAttachment(Bundle.class);
@@ -103,11 +97,6 @@
}
}
- /**
- * Remove deployment mapping.
- *
- * @param unit the deployment unit
- */
public void removeDeployment(DeploymentUnit unit)
{
Bundle bundle = unit.getAttachment(Bundle.class);
More information about the jboss-cvs-commits
mailing list