felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From db...@apache.org
Subject svn commit: r944229 - in /felix/trunk/gogo: commands/pom.xml runtime/src/main/java/org/apache/felix/gogo/runtime/Activator.java runtime/src/main/java/org/apache/felix/gogo/runtime/FelixCommandAdaptor.java
Date Fri, 14 May 2010 12:39:12 GMT
Author: dbaum
Date: Fri May 14 12:39:12 2010
New Revision: 944229

URL: http://svn.apache.org/viewvc?rev=944229&view=rev
Log:
removed legacy felix command adaptor. (FELIX-2342)

Removed:
    felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/FelixCommandAdaptor.java
Modified:
    felix/trunk/gogo/commands/pom.xml
    felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Activator.java

Modified: felix/trunk/gogo/commands/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/commands/pom.xml?rev=944229&r1=944228&r2=944229&view=diff
==============================================================================
--- felix/trunk/gogo/commands/pom.xml (original)
+++ felix/trunk/gogo/commands/pom.xml Fri May 14 12:39:12 2010
@@ -24,7 +24,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>bundle</packaging>
-    <name>Apache Felix Gogo Commands</name>
+    <name>Apache Felix Gogo Command Framework</name>
     <artifactId>org.apache.felix.gogo.commands</artifactId>
     <version>0.5.0-SNAPSHOT</version>
     <dependencies>

Modified: felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Activator.java?rev=944229&r1=944228&r2=944229&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Activator.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Activator.java Fri
May 14 12:39:12 2010
@@ -19,9 +19,7 @@
 package org.apache.felix.gogo.runtime;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.felix.gogo.runtime.shell.CommandProcessorImpl;
 import org.apache.felix.gogo.runtime.shell.CommandProxy;
@@ -44,10 +42,8 @@ public class Activator implements Bundle
     private ThreadIOImpl threadio;
     private ServiceTracker commandTracker;
     private ServiceTracker converterTracker;
-    private ServiceTracker felixTracker;
     private ServiceRegistration processorRegistration;
     private ServiceRegistration threadioRegistration;
-    private Map<ServiceReference, ServiceRegistration> felixRegistrations;
     
     protected CommandProcessorImpl newProcessor(ThreadIO tio, BundleContext context)
     {
@@ -68,10 +64,6 @@ public class Activator implements Bundle
         commandTracker = trackOSGiCommands(context);
         commandTracker.open();
 
-        felixRegistrations = new HashMap<ServiceReference, ServiceRegistration>();
-        felixTracker = trackFelixCommands(context);
-        felixTracker.open();
-
         converterTracker = new ServiceTracker(context, Converter.class.getName(), null)
         {
             @Override
@@ -96,11 +88,8 @@ public class Activator implements Bundle
     {
         processorRegistration.unregister();
         threadioRegistration.unregister();
-        
         commandTracker.close();
         converterTracker.close();
-        felixTracker.close();
-
         threadio.stop();
     }
 
@@ -169,39 +158,4 @@ public class Activator implements Bundle
         };
     }
 
-    private ServiceTracker trackFelixCommands(final BundleContext context)
-    {
-        return new ServiceTracker(context, FelixCommandAdaptor.FELIX_COMMAND, null)
-        {
-            @Override
-            public Object addingService(ServiceReference ref)
-            {
-                Object felixCommand = super.addingService(ref);
-                try
-                {
-                    FelixCommandAdaptor adaptor = new FelixCommandAdaptor(felixCommand);
-                    felixRegistrations.put(ref, context.registerService(
-                        FelixCommandAdaptor.class.getName(), adaptor,
-                        adaptor.getAttributes()));
-                    return felixCommand;
-                }
-                catch (Exception e)
-                {
-                    System.err.println("felixcmd: " + e);
-                    return null;
-                }
-            }
-
-            @Override
-            public void removedService(ServiceReference reference, Object service)
-            {
-                ServiceRegistration reg = felixRegistrations.remove(reference);
-                if (reg != null)
-                {
-                    reg.unregister();
-                }
-                super.removedService(reference, service);
-            }
-        };
-    }
 }



Mime
View raw message