felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r812509 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
Date Tue, 08 Sep 2009 13:44:39 GMT
Author: fmeschbe
Date: Tue Sep  8 13:44:38 2009
New Revision: 812509

URL: http://svn.apache.org/viewvc?rev=812509&view=rev
Log:
FELIX-1569 Remove support for the Render interface from the OsgiManager

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java?rev=812509&r1=812508&r2=812509&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
Tue Sep  8 13:44:38 2009
@@ -18,16 +18,34 @@
 
 
 import java.io.IOException;
-import java.util.*;
-
-import javax.servlet.*;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.servlet.GenericServlet;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.felix.webconsole.*;
-import org.apache.felix.webconsole.internal.*;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.apache.felix.webconsole.Action;
+import org.apache.felix.webconsole.BrandingPlugin;
+import org.apache.felix.webconsole.WebConsoleConstants;
+import org.apache.felix.webconsole.internal.Logger;
+import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
+import org.apache.felix.webconsole.internal.Util;
+import org.apache.felix.webconsole.internal.WebConsolePluginAdapter;
 import org.apache.felix.webconsole.internal.core.BundlesServlet;
-import org.osgi.framework.*;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.http.HttpContext;
 import org.osgi.service.http.HttpService;
 import org.osgi.service.log.LogService;
@@ -139,8 +157,6 @@
 
     private ServiceTracker operationsTracker;
 
-    private ServiceTracker rendersTracker;
-
     private ServiceTracker pluginsTracker;
 
     private ServiceTracker brandingTracker;
@@ -249,10 +265,6 @@
                     {
                         bindOperation( ( Action ) plugin );
                     }
-                    if ( plugin instanceof Render )
-                    {
-                        bindRender( ( Render ) plugin );
-                    }
                     if ( plugin instanceof BrandingPlugin )
                     {
                         AbstractWebConsolePlugin.setBrandingPlugin((BrandingPlugin) plugin);
@@ -268,8 +280,6 @@
         // start tracking external plugins after setting up our own plugins
         operationsTracker = new OperationServiceTracker( this );
         operationsTracker.open();
-        rendersTracker = new RenderServiceTracker( this );
-        rendersTracker.open();
         pluginsTracker = new PluginServiceTracker( this );
         pluginsTracker.open();
         brandingTracker = new BrandingServiceTracker(this);
@@ -342,11 +352,6 @@
             operationsTracker.close();
             operationsTracker = null;
         }
-        if ( rendersTracker != null )
-        {
-            rendersTracker.close();
-            rendersTracker = null;
-        }
         if ( pluginsTracker != null )
         {
             pluginsTracker.close();
@@ -502,41 +507,6 @@
         }
     }
 
-    private static class RenderServiceTracker extends ServiceTracker
-    {
-
-        private final OsgiManager osgiManager;
-
-
-        RenderServiceTracker( OsgiManager osgiManager )
-        {
-            super( osgiManager.getBundleContext(), Render.SERVICE, null );
-            this.osgiManager = osgiManager;
-        }
-
-
-        public Object addingService( ServiceReference reference )
-        {
-            Object operation = super.addingService( reference );
-            if ( operation instanceof Render )
-            {
-                osgiManager.bindRender( ( Render ) operation );
-            }
-            return operation;
-        }
-
-
-        public void removedService( ServiceReference reference, Object service )
-        {
-            if ( service instanceof Render )
-            {
-                osgiManager.bindRender( ( Render ) service );
-            }
-
-            super.removedService( reference, service );
-        }
-    }
-
     private static class PluginServiceTracker extends ServiceTracker
     {
 
@@ -611,7 +581,7 @@
     private static class BrandingServiceTracker extends ServiceTracker
     {
         private final OsgiManager osgiManager;
-        
+
         BrandingServiceTracker( OsgiManager osgiManager ){
             super( osgiManager.getBundleContext(), BrandingPlugin.class.getName(), null );
             this.osgiManager = osgiManager;
@@ -787,20 +757,6 @@
     }
 
 
-    protected void bindRender( Render render )
-    {
-        RenderBridge bridge = new RenderBridge( render );
-        bridge.activate( getBundleContext() );
-        bindServlet( render.getName(), bridge );
-    }
-
-
-    protected void unbindRender( Render render )
-    {
-        unbindServlet( render.getName() );
-    }
-
-
     private Dictionary getConfiguration()
     {
         return configuration;



Mime
View raw message