[jboss-osgi-commits] JBoss-OSGI SVN: r89656 - in projects/jboss-osgi/trunk: bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog and 9 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Tue Jun 2 05:45:10 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-02 05:45:09 -0400 (Tue, 02 Jun 2009)
New Revision: 89656

Modified:
   projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java
   projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml
   projects/jboss-osgi/trunk/integration/deployers/src/main/java/org/jboss/osgi/deployer/helpers/DeploymentProvidedDeploymentUnitFilter.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/RemoteLogReaderService.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedServiceReference.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/Capability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JAXBCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JMXCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JNDICapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiBundle.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiPackageAdmin.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiServiceReference.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteLogCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLBindingCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLParserCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedPackageAdmin.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedServiceReference.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemotePackageAdmin.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteServiceReference.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/AuditService.java
Log:
Add javadoc

Modified: projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -23,6 +23,8 @@
 
 //$Id$
 
+import static org.osgi.framework.Constants.OBJECTCLASS;
+
 import java.net.URL;
 import java.util.Arrays;
 import java.util.List;
@@ -40,7 +42,6 @@
 import org.jboss.osgi.spi.service.XMLBindingService;
 import org.jboss.virtual.VFS;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
 import org.osgi.framework.Filter;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
@@ -103,8 +104,8 @@
       Filter filter;
       try
       {
-         String jmxService = "(" + Constants.OBJECTCLASS + "=" + MBeanServer.class.getName() + ")";
-         String xmlService = "(" + Constants.OBJECTCLASS + "=" + XMLBindingService.class.getName() + ")";
+         String jmxService = "(" + OBJECTCLASS + "=" + MBeanServer.class.getName() + ")";
+         String xmlService = "(" + OBJECTCLASS + "=" + XMLBindingService.class.getName() + ")";
          filter = context.createFilter("(|" + jmxService + xmlService + ")");
       }
       catch (InvalidSyntaxException ex)
@@ -123,7 +124,7 @@
          {
             Object service = super.addingService(sref);
             
-            List<String> classList = Arrays.asList((String[])sref.getProperty(Constants.OBJECTCLASS));
+            List<String> classList = Arrays.asList((String[])sref.getProperty(OBJECTCLASS));
             if (classList.contains(MBeanServer.class.getName()))
                mbeanServer = (MBeanServer)service;
 

Modified: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -35,7 +35,7 @@
 
 import org.jboss.osgi.common.log.LogServiceTracker;
 import org.jboss.osgi.service.remotelog.internal.RemoteLogEntry;
-import org.jboss.osgi.service.remotelog.internal.RemoteLogServiceActivator;
+import org.jboss.osgi.spi.logging.RemoteLogReaderService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.log.LogEntry;
@@ -45,7 +45,8 @@
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
- * [TODO]
+ * A server side {@link LogListener} that sends {@link LogEntry} objects 
+ * via a socket connection
  * 
  * @author thomas.diesler at jboss.com
  * @since 12-Apr-2009
@@ -64,8 +65,8 @@
       this.log = new LogServiceTracker(context);
       this.context = context;
       
-      this.host = props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_HOST);
-      this.port = new Integer(props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_PORT));
+      this.host = props.getProperty(RemoteLogReaderService.REMOTE_LOG_HOST);
+      this.port = new Integer(props.getProperty(RemoteLogReaderService.REMOTE_LOG_PORT));
       
       log.log(LogService.LOG_DEBUG, "RemoteLogListener: [host=" + host + ",port=" + port + "]");
    }

Modified: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -43,7 +43,7 @@
 import org.osgi.service.log.LogService;
 
 /**
- * [TODO]
+ * An implementation of the {@link RemoteLogReaderService}
  * 
  * @author thomas.diesler at jboss.com
  * @since 12-Apr-2009
@@ -61,8 +61,8 @@
    public RemoteLogReaderServiceImpl(BundleContext context, Properties props)
    {
       this.log = new LogServiceTracker(context);
-      this.host = props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_HOST);
-      this.port = new Integer(props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_PORT));
+      this.host = props.getProperty(REMOTE_LOG_HOST);
+      this.port = new Integer(props.getProperty(REMOTE_LOG_PORT));
    }
 
    public void addLogListener(LogListener listener)

Modified: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -23,6 +23,11 @@
 
 //$Id$
 
+import static org.jboss.osgi.spi.logging.RemoteLogReaderService.REMOTE_LOG_HOST;
+import static org.jboss.osgi.spi.logging.RemoteLogReaderService.REMOTE_LOG_PORT;
+import static org.jboss.osgi.spi.logging.RemoteLogReaderService.REMOTE_LOG_READER;
+import static org.jboss.osgi.spi.logging.RemoteLogReaderService.REMOTE_LOG_SENDER;
+
 import java.util.Properties;
 
 import org.jboss.osgi.service.remotelog.RemoteLogListener;
@@ -32,18 +37,13 @@
 import org.osgi.framework.BundleContext;
 
 /**
- * [TODO]
+ * Activates the {@link RemoteLogReaderService}
  * 
  * @author thomas.diesler at jboss.com
  * @since 23-Jan-2009
  */
 public class RemoteLogServiceActivator implements BundleActivator
 {
-   public static final String REMOTE_LOG_SENDER = "org.jboss.osgi.service.remote.log.sender";
-   public static final String REMOTE_LOG_READER = "org.jboss.osgi.service.remote.log.reader";
-   public static final String REMOTE_LOG_HOST = "org.jboss.osgi.service.remote.log.host";
-   public static final String REMOTE_LOG_PORT = "org.jboss.osgi.service.remote.log.port";
-
    private Boolean isReader = Boolean.FALSE;
    private Boolean isSender = Boolean.FALSE;
    private RemoteLogReaderServiceImpl readerService;

Modified: projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml	2009-06-02 09:45:09 UTC (rev 89656)
@@ -268,7 +268,7 @@
     
       <description>Integration with an existing JBossAS instance</description>
 
-      <!-- deployers -->
+      <!-- https://jira.jboss.org/jira/browse/JBOSGI-94 -->
       <fileset condition="isJBoss501" dir="@{deploy.artifacts.dir}/etc/jboss501/server/deployers" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers" override="true">
         <include name="metadata-deployer-jboss-beans.xml" />
       </fileset>

Modified: projects/jboss-osgi/trunk/integration/deployers/src/main/java/org/jboss/osgi/deployer/helpers/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/trunk/integration/deployers/src/main/java/org/jboss/osgi/deployer/helpers/DeploymentProvidedDeploymentUnitFilter.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/integration/deployers/src/main/java/org/jboss/osgi/deployer/helpers/DeploymentProvidedDeploymentUnitFilter.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -34,7 +34,7 @@
  * A Deployer can attach a DeploymentUnitFilter to a DeploymentUnit which controlls whether 
  * the DeploymentUnit is to be processed by following Deployers
  *
- * [TODO] Remove this class when this functionallity is natively supported by all target containers 
+ * [TODO] JBOSGI-94 
  * 
  * @author Thomas.Diesler at jboss.com
  * @since 27-Feb-2009

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/RemoteLogReaderService.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/RemoteLogReaderService.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/RemoteLogReaderService.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -23,14 +23,27 @@
 
 //$Id$
 
+import org.osgi.service.log.LogEntry;
 import org.osgi.service.log.LogReaderService;
 
 /**
- * [TODO]
+ * An extension of the {@link LogReaderService} that can be setup 
+ * to receive remote {@link LogEntry} objects.
  * 
  * @author thomas.diesler at jboss.com
  * @since 12-Apr-2009
  */
 public interface RemoteLogReaderService extends LogReaderService
 {
+   /** Property to set to 'true' on the sending side: 'org.jboss.osgi.service.remote.log.sender' */
+   String REMOTE_LOG_SENDER = "org.jboss.osgi.service.remote.log.sender";
+   
+   /** Property to set to 'true' on the receiving side: 'org.jboss.osgi.service.remote.log.reader' */
+   String REMOTE_LOG_READER = "org.jboss.osgi.service.remote.log.reader";
+   
+   /** Property to set the receiving host: 'org.jboss.osgi.service.remote.log.host' */
+   String REMOTE_LOG_HOST = "org.jboss.osgi.service.remote.log.host";
+   
+   /** Property to set the receiving port: 'org.jboss.osgi.service.remote.log.port' */
+   String REMOTE_LOG_PORT = "org.jboss.osgi.service.remote.log.port";
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -115,7 +115,7 @@
          for (String key : sref.getPropertyKeys())
             props.put(key, sref.getProperty(key));
 
-         manref = new ManagedServiceReference(clazz, props);
+         manref = new ManagedServiceReference(props);
       }
       return manref;
    }
@@ -132,7 +132,7 @@
             for (String key : sref.getPropertyKeys())
                props.put(key, sref.getProperty(key));
 
-            foundRefs.add(new ManagedServiceReference(clazz, props));
+            foundRefs.add(new ManagedServiceReference(props));
          }
       }
 

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedServiceReference.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedServiceReference.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/management/ManagedServiceReference.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -25,8 +25,10 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.osgi.framework.ServiceReference;
+
 /**
- * [TODO]
+ * The management view of an OSGi {@link ServiceReference}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
@@ -35,24 +37,27 @@
 {
    private static final long serialVersionUID = 1L;
    
-   private String serviceInterface;
    private Map<String, Object> props;
    
-   public ManagedServiceReference(String className, Map<String, Object> props)
+   ManagedServiceReference(Map<String, Object> props)
    {
-      this.serviceInterface = className;
+      this.props = props;
    }
 
-   public String getServiceInterface()
-   {
-      return serviceInterface;
-   }
-
+   /**
+    * Returns the property value to which the specified property key is mapped 
+    * in the properties Dictionary object of the service referenced by this 
+    * ServiceReference object.
+    */
    public Object getProperty(String key)
    {
       return props.get(key);
    }
 
+   /**
+    * Returns an array of the keys in the properties Dictionary 
+    * object of the service referenced by this ServiceReference  object. 
+    */
    public String[] getPropertyKeys()
    {
       Set<String> keySet = props.keySet();

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,10 +21,10 @@
  */
 package org.jboss.osgi.spi.testing;
 
+//$Id$
+
 import org.jboss.osgi.spi.service.BlueprintService;
 
-//$Id$
-
 /**
  * Adds the Blueprint capability to the {@link OSGiRuntime}
  * under test. 

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/Capability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/Capability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/Capability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -50,21 +50,45 @@
    private Set<Capability> dependencies = new LinkedHashSet<Capability>();
    private Set<String> bundles = new LinkedHashSet<String>();
 
+   /**
+    * Construct a capability that is identified by the given service name.
+    * If the service name is already registered with the {@link OSGiRuntime}
+    * adding this capability does nothing. 
+    */
    public Capability(String serviceName)
    {
       this.serviceName = serviceName;
    }
 
+   /**
+    * Get the service name associated with this capability.
+    */
    public String getServiceName()
    {
       return serviceName;
    }
 
+   /**
+    * Get system properties provided by this capability.
+    * 
+    * Adding this capability will set the associated system properties
+    * if a propperty is not set already.
+    */
    public Properties getProperties()
    {
       return props;
    }
 
+   public List<Capability> getDependencies()
+   {
+      return new ArrayList<Capability>(dependencies);
+   }
+   
+   public List<String> getBundles()
+   {
+      return new ArrayList<String>(bundles);
+   }
+
    protected void addBundle(String bundle)
    {
       bundles.add(bundle);
@@ -74,14 +98,4 @@
    {
       dependencies.add(dependency);
    }
-
-   public List<Capability> getDependencies()
-   {
-      return new ArrayList<Capability>(dependencies);
-   }
-   
-   public List<String> getBundles()
-   {
-      return new ArrayList<String>(bundles);
-   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,16 +21,27 @@
  */
 package org.jboss.osgi.spi.testing;
 
+//$Id$
+
 import java.util.Properties;
 
 import org.osgi.service.http.HttpService;
 
-
-//$Id$
-
 /**
- * [TODO]
+ * Adds the {@link HttpService} capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link HttpService} is already registered.
+ * 
+ * Installed bundles: org.apache.felix.http.jetty.jar
+ * 
+ * Default properties set by this capability
+ * 
+ * <table>
+ * <tr><th>Property</th><th>Value</th></tr> 
+ * <tr><td>org.osgi.service.http.port</td><td>8090</td></tr> 
+ * </table> 
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,12 +21,20 @@
  */
 package org.jboss.osgi.spi.testing;
 
+
 //$Id$
 
 
 /**
- * [TODO]
+ * Adds the Husky testing capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if a Husky connector is already registered.
+ * 
+ * Dependent capabilities: {@link JMXCapability}.
+ * 
+ * Installed bundles: jboss-osgi-husky.jar
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JAXBCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JAXBCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JAXBCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,14 +21,20 @@
  */
 package org.jboss.osgi.spi.testing;
 
-import org.jboss.osgi.spi.service.JAXBService;
-
 //$Id$
 
+import org.jboss.osgi.spi.service.JAXBService;
 
 /**
- * [TODO]
+ * Adds the JAXB capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link JAXBService} is already registered.
+ * 
+ * Dependent capabilities: {@link XMLParserCapability}.
+ * 
+ * Installed bundles: jboss-osgi-jaxb.jar
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JMXCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JMXCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JMXCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -28,8 +28,21 @@
 import javax.management.MBeanServer;
 
 /**
- * [TODO]
+ * Adds the JMX capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link MBeanServer} is already registered.
+ * 
+ * Installed bundles: jboss-osgi-jmx.jar
+ * 
+ * Default properties set by this capability
+ * 
+ * <table>
+ * <tr><th>Property</th><th>Value</th></tr> 
+ * <tr><td>org.jboss.osgi.jmx.host</td><td>${jboss.bind.address}</td></tr> 
+ * <tr><td>org.jboss.osgi.jmx.rmi.port</td><td>1198</td></tr> 
+ * </table>
+ *  
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JNDICapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JNDICapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/JNDICapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -28,8 +28,22 @@
 import javax.naming.InitialContext;
 
 /**
- * [TODO]
+ * Adds the JNDI capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link InitialContext} is already registered.
+ * 
+ * Installed bundles: jboss-osgi-common-core.jar, jboss-osgi-jndi.jar
+ * 
+ * Default properties set by this capability
+ * 
+ * <table>
+ * <tr><th>Property</th><th>Value</th></tr> 
+ * <tr><td>org.jboss.osgi.jndi.host</td><td>${jboss.bind.address}</td></tr> 
+ * <tr><td>org.jboss.osgi.jndi.rmi.port</td><td>1198</td></tr> 
+ * <tr><td>org.jboss.osgi.jndi.port</td><td>1199</td></tr> 
+ * </table>
+ *  
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -26,8 +26,15 @@
 import org.jboss.osgi.spi.service.MicrocontainerService;
 
 /**
- * [TODO]
+ * Adds the Microcontainer capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link MicrocontainerService} is already registered.
+ * 
+ * Dependent capabilities: {@link JMXCapability}, {@link XMLBindingCapability}.
+ * 
+ * Installed bundles: jboss-osgi-microcontainer.jar
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiBundle.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiBundle.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiBundle.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -23,35 +23,65 @@
 
 import java.util.Dictionary;
 
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
 
 /**
- * An OSGi Test Case
+ * An abstraction of an OSGi {@link Bundle}.
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
  */
 public abstract class OSGiBundle
 {
+   /**
+    * Returns this bundle's unique identifier.
+    */
    public abstract long getBundleId();
    
+   /**
+    * Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header.
+    */
    public abstract String getSymbolicName();
 
+   /**
+    * Returns the version of this bundle as specified by its Bundle-Version manifest header.
+    */
    public abstract String getVersion();
    
+   /**
+    * Returns this bundle's Manifest headers and values.
+    */
    public abstract Dictionary<String, String> getHeaders();
    
+   /**
+    * Returns this bundle's current state.
+    */
    public abstract int getState();
 
+   /**
+    * Returns the value of the specified property.
+    */
    public abstract String getProperty(String key);
 
+   /**
+    * Starts this bundle.
+    */
    public abstract void start() throws BundleException;
    
+   /**
+    * Stops this bundle.
+    */
    public abstract void stop() throws BundleException;
    
+   /**
+    * Uninstalls this bundle.
+    */
    public abstract void uninstall() throws BundleException;
    
-   @Override
+   /**
+    * Return true if symbolic name and version are equal
+    */
    public boolean equals(Object obj)
    {
       if ((obj instanceof OSGiBundle) == false)
@@ -64,12 +94,17 @@
       return isEqual;
    }
 
-   @Override
+   /**
+    * Returns the hash code for this bundle. 
+    */
    public int hashCode()
    {
       return toString().hashCode();
    }
 
+   /**
+    * Returns the string representation of this bundle 
+    */
    public String toString()
    {
       return "[" + getSymbolicName() + "," + getVersion() + "]";

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiPackageAdmin.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiPackageAdmin.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiPackageAdmin.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,14 +21,25 @@
  */
 package org.jboss.osgi.spi.testing;
 
+//$Id$
 
+import org.osgi.service.packageadmin.PackageAdmin;
+
 /**
- * [TODO]
+ * An abstraction of the OSGi {@link PackageAdmin} service.
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
  */
 public interface OSGiPackageAdmin
 {
+   /**
+    * Forces the update (replacement) or removal of packages exported by the specified bundles.
+    * 
+    * @see {@link PackageAdmin#refreshPackages(org.osgi.framework.Bundle[])}
+    * 
+    * @param bundles The bundles whose exported packages are to be updated or removed, 
+    * or null for all bundles updated or uninstalled since the last call to this method. 
+    */
    void refreshPackages(OSGiBundle[] bundles);
 }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -28,45 +28,109 @@
 import org.jboss.osgi.spi.logging.LogEntryCache;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.packageadmin.PackageAdmin;
 
 /**
- * [TODO]
+ * An abstraction of an OSGi Runtime.
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
  */
 public interface OSGiRuntime
 {
+   /**
+    * Add a {@link Capability} to the runtime.
+    * 
+    * Adding a capability recursively adds the orderded set of dependent capabilities
+    * before it installs and starts the orderded set bundles. 
+    */
    void addCapability(Capability capability) throws BundleException;
 
+   /**
+    * Remove a {@link Capability} from the runtime.
+    * 
+    * Removing a capability does the reverse of {@link #addCapability(Capability)}.
+    */
    void removeCapability(Capability capability);
 
-   void startLogEntryTracking(LogEntryCache logEntryCache);
-
-   void stopLogEntryTracking();
-
+   /**
+    * Install an {@link OSGiBundle} from the given location.
+    */
    OSGiBundle installBundle(String location) throws BundleException;
-
+   
+   /**
+    * Get the array of installed {@link OSGiBundle}s
+    */
    OSGiBundle[] getBundles();
 
+   /**
+    * Get the {@link OSGiBundle} for a given symbolic name and version
+    * 
+    * In case the version is left unspecified, it returns the first bundle that 
+    * matches the symbolic name.
+    * 
+    * @param version may be null
+    * @return The bundle or null if there is none
+    */
    OSGiBundle getBundle(String symbolicName, String version);
 
+   /**
+    * Get an abstraction of the {@link PackageAdmin}.
+    */
    OSGiPackageAdmin getPackageAdmin();
 
+   /**
+    * Returns a ServiceReference object for a service that implements and was registered 
+    * under the specified class.
+    * 
+    * @return A ServiceReference object, or null  if no services are registered which implement the named class. 
+    */
    OSGiServiceReference getServiceReference(String clazz);
    
+   /**
+    * Returns an array of ServiceReference objects. 
+    * The returned array of ServiceReference objects contains services that were registered under the specified 
+    * class and match the specified filter criteria. 
+    */
    OSGiServiceReference[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException;
    
+   /**
+    * Start log entry tracking for this {@link OSGiRuntime}
+    * @see {@link RemoteLogCapability}
+    */
+   void startLogEntryTracking(LogEntryCache logEntryCache);
+
+   /**
+    * Stop log entry tracking for this {@link OSGiRuntime}
+    * @see {@link RemoteLogCapability}
+    */
+   void stopLogEntryTracking();
+
+   /**
+    * Get the initial naming context for this {@link OSGiRuntime}
+    */
    InitialContext getInitialContext() throws NamingException;
 
+   /**
+    * Get the MBeanServerConnection for this {@link OSGiRuntime}
+    */
    MBeanServerConnection getMBeanServer();
 
-   void deploy(String location) throws Exception;
-
-   void undeploy(String location) throws Exception;
-
+   /**
+    * Get the host name that this {@link OSGiRuntime} is running on.
+    * 
+    * This is the value of the 'jboss.bind.address' system property.
+    */
    String getServerHost();
 
+   /**
+    * Shutdown the {@link OSGiRuntime}.
+    * 
+    * This will remove all added {@link Capability}.
+    * 
+    * The installed bundles are currently NOT uninstalled automatically.
+    * 
+    * [TODO] JBOSGI-93
+    */
    void shutdown();
-
 }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiServiceReference.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiServiceReference.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiServiceReference.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,16 +21,27 @@
  */
 package org.jboss.osgi.spi.testing;
 
+import org.osgi.framework.ServiceReference;
 
+
 /**
- * [TODO]
+ * An abstraction of the OSGi {@link ServiceReference}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
  */
 public interface OSGiServiceReference
 {
+   /**
+    * Returns the property value to which the specified property key is mapped 
+    * in the properties Dictionary object of the service referenced by this 
+    * ServiceReference object.
+    */
    Object getProperty(String key);
    
+   /**
+    * Returns an array of the keys in the properties Dictionary 
+    * object of the service referenced by this ServiceReference  object. 
+    */
    String[] getPropertyKeys();
 }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -33,8 +33,11 @@
 import org.junit.Before;
 
 /**
- * An OSGi Test Case
+ * An abstract OSGi Test.
  * 
+ * This is a convenience wrapper for the functionality provided 
+ * by {@link OSGiTestHelper}. 
+ * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
  */
@@ -45,24 +48,33 @@
 
    private OSGiTestHelper helper = new OSGiTestHelper();
 
-   public OSGiTest()
+   protected OSGiTest()
    {
       // Prevent unknown protocol: vfsfile
       VFS.init();
    }
 
+   /**
+    * Writes a a debug start messge
+    */
    @Before
    public void setUp() throws Exception
    {
       log.debug("### START " + getLongName());
    }
 
+   /**
+    * Writes a a debug stop messge
+    */
    @After
    public void tearDown() throws Exception
    {
       log.debug("### END " + getLongName());
    }
 
+   /**
+    * Get the last token in the FQN of this test class. 
+    */
    protected String getShortName()
    {
       String shortName = getClass().getName();
@@ -70,56 +82,89 @@
       return shortName;
    }
 
+   /**
+    * Get the the FQN of this test class. 
+    */
    protected String getLongName()
    {
       return getClass().getName();
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getDefaultRuntime()}
+    */
    protected OSGiRuntime getDefaultRuntime()
    {
       return helper.getDefaultRuntime();
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getEmbeddedRuntime()}
+    */
    protected OSGiRuntime getEmbeddedRuntime()
    {
       return helper.getEmbeddedRuntime();
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getRemoteRuntime()}
+    */
    public OSGiRuntime getRemoteRuntime()
    {
       return helper.getRemoteRuntime();
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getResourceURL(String)}
+    */
    protected URL getResourceURL(String resource)
    {
       return helper.getResourceURL(resource);
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getResourceFile(String)}
+    */
    protected File getResourceFile(String resource)
    {
       return helper.getResourceFile(resource);
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getTestArchiveURL(String)}
+    */
    protected URL getTestArchiveURL(String archive)
    {
       return helper.getTestArchiveURL(archive);
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getTestArchiveFile(String)}
+    */
    protected File getTestArchiveFile(String archive)
    {
       return helper.getTestArchiveFile(archive);
    }
    
+   /**
+    * Delegates to {@link OSGiTestHelper#getInitialContext()}
+    */
    public InitialContext getInitialContext() throws NamingException
    {
       return helper.getInitialContext();
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getJndiPort()}
+    */
    public Integer getJndiPort()
    {
       return helper.getJndiPort();
    }
 
+   /**
+    * Delegates to {@link OSGiTestHelper#getServerHost()}
+    */
    public String getServerHost()
    {
       return helper.getServerHost();

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteLogCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteLogCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteLogCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -27,11 +27,24 @@
 
 import org.jboss.osgi.spi.service.RemoteLogService;
 
-
-
 /**
- * [TODO]
+ * Adds the RemoteLog capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link RemoteLogService} is already registered.
+ * 
+ * Installed bundles: jboss-osgi-remotelog.jar
+ * 
+ * Default properties set by this capability
+ * 
+ * <table>
+ * <tr><th>Property</th><th>Value</th></tr> 
+ * <tr><td>org.jboss.osgi.service.remote.log.reader</td><td>true</td></tr> 
+ * <tr><td>org.jboss.osgi.service.remote.log.host</td><td>${jboss.bind.address}</td></tr> 
+ * <tr><td>org.jboss.osgi.service.remote.log.port</td><td>5400</td></tr> 
+ * </table>
+ *  
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLBindingCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLBindingCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLBindingCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,15 +21,20 @@
  */
 package org.jboss.osgi.spi.testing;
 
-import org.jboss.osgi.spi.service.XMLBindingService;
-
-
 //$Id$
 
+import org.jboss.osgi.spi.service.XMLBindingService;
 
 /**
- * [TODO]
+ * Adds the JBossXB capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link XMLBindingService} is already registered.
+ * 
+ * Dependent capabilities: {@link JAXBCapability}.
+ * 
+ * Installed bundles: jboss-osgi-common-core.jar, jboss-osgi-xml-binding.jar
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLParserCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLParserCapability.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/XMLParserCapability.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,16 +21,18 @@
  */
 package org.jboss.osgi.spi.testing;
 
-import javax.xml.parsers.SAXParserFactory;
-
-
-
 //$Id$
 
+import javax.xml.parsers.SAXParserFactory;
 
 /**
- * [TODO]
+ * Adds the XML parser capability to the {@link OSGiRuntime}
+ * under test. 
  * 
+ * It is ignored if the {@link SAXParserFactory} is already registered.
+ * 
+ * Installed bundles: jboss-osgi-apache-xerces.jar
+ * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedPackageAdmin.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedPackageAdmin.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedPackageAdmin.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -27,7 +27,7 @@
 import org.osgi.service.packageadmin.PackageAdmin;
 
 /**
- * [TODO]
+ * An embedded implementation of the {@link OSGiPackageAdmin}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -39,6 +39,7 @@
 import org.jboss.osgi.spi.testing.Capability;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiServiceReference;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
 import org.osgi.framework.Bundle;
@@ -51,7 +52,7 @@
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
- * [TODO]
+ * An embedded implementation of the {@link OSGiRuntime}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedServiceReference.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedServiceReference.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedServiceReference.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -21,11 +21,13 @@
  */
 package org.jboss.osgi.spi.testing.internal;
 
+// $Id$
+
 import org.jboss.osgi.spi.testing.OSGiServiceReference;
 import org.osgi.framework.ServiceReference;
 
 /**
- * [TODO]
+ * An embedded implementation of the {@link OSGiServiceReference}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -49,7 +49,7 @@
 import org.osgi.service.log.LogReaderService;
 
 /**
- * [TODO]
+ * An abstract implementation of the {@link OSGiRuntime}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
@@ -184,13 +184,13 @@
       log.debug("End Shutdown");
    }
 
-   public void deploy(String location) throws Exception
+   protected void deploy(String location) throws Exception
    {
       URL archiveURL = getTestHelper().getTestArchiveURL(location);
       invokeDeployerService("deploy", archiveURL);
    }
 
-   public void undeploy(String location) throws Exception
+   protected void undeploy(String location) throws Exception
    {
       URL archiveURL = getTestHelper().getTestArchiveURL(location);
       invokeDeployerService("undeploy", archiveURL);

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemotePackageAdmin.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemotePackageAdmin.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemotePackageAdmin.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -28,7 +28,7 @@
 import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
 
 /**
- * [TODO]
+ * A remote implementation of the {@link OSGiPackageAdmin}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -40,6 +40,7 @@
 import org.jboss.osgi.spi.management.ManagedServiceReference;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiServiceReference;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
 import org.jboss.osgi.spi.testing.RemoteLogCapability;
@@ -51,7 +52,7 @@
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
- * [TODO]
+ * A remote implementation of the {@link OSGiRuntime}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008
@@ -89,6 +90,18 @@
       }
    }
    
+   @Override
+   public void deploy(String location) throws Exception
+   {
+      super.deploy(location);
+   }
+
+   @Override
+   public void undeploy(String location) throws Exception
+   {
+      super.undeploy(location);
+   }
+
    public OSGiBundle[] getBundles()
    {
       try

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteServiceReference.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteServiceReference.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteServiceReference.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -25,7 +25,7 @@
 import org.jboss.osgi.spi.testing.OSGiServiceReference;
 
 /**
- * [TODO]
+ * A remote implementation of the {@link OSGiServiceReference}
  * 
  * @author Thomas.Diesler at jboss.org
  * @since 25-Sep-2008

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -31,9 +31,11 @@
 import org.jboss.osgi.spi.testing.JMXCapability;
 import org.jboss.osgi.spi.testing.JNDICapability;
 import org.jboss.osgi.spi.testing.MicrocontainerCapability;
+import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.jboss.osgi.spi.testing.internal.RemoteRuntime;
 import org.jboss.test.osgi.jbossas.jbosgi36.mbean.FooMBean;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -50,6 +52,7 @@
 public class OSGI36TestCase extends OSGiTest
 {
    static OSGiRuntime runtime;
+   static OSGiBundle bundle;
 
    @BeforeClass
    public static void setUpClass() throws Exception
@@ -59,15 +62,18 @@
       runtime.addCapability(new JMXCapability());
       runtime.addCapability(new MicrocontainerCapability());
 
-      runtime.deploy("jbosgi36-bundle.jar");
-      runtime.deploy("jbosgi36-mbean.jar");
+      bundle = runtime.installBundle("jbosgi36-bundle.jar");
+      ((RemoteRuntime)runtime).deploy("jbosgi36-mbean.jar");
    }
 
    @AfterClass
    public static void tearDownClass() throws Exception
    {
-      runtime.undeploy("jbosgi36-mbean.jar");
-      runtime.undeploy("jbosgi36-bundle.jar");
+      ((RemoteRuntime)runtime).undeploy("jbosgi36-mbean.jar");
+      
+      if (bundle != null)
+         bundle.uninstall();
+      
       runtime.shutdown();
    }
 

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/AuditService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/AuditService.java	2009-06-02 08:57:54 UTC (rev 89655)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/AuditService.java	2009-06-02 09:45:09 UTC (rev 89656)
@@ -1,7 +1,7 @@
 package org.jboss.test.osgi.trailblazer;
 
 /**
- * [TODO]
+ * An audit service interface.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009




More information about the jboss-osgi-commits mailing list