You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2016/08/26 14:53:49 UTC

svn commit: r1757863 - in /felix/sandbox/http-base-r7: ./ src/main/java/org/apache/felix/http/base/internal/dispatch/ src/main/java/org/apache/felix/http/base/internal/runtime/ src/main/java/org/apache/felix/http/base/internal/runtime/dto/ src/main/jav...

Author: cziegeler
Date: Fri Aug 26 14:53:49 2016
New Revision: 1757863

URL: http://svn.apache.org/viewvc?rev=1757863&view=rev
Log:
FELIX-5298 : [RFC 223] 5.2 Request Preprocessing

Added:
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java   (with props)
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java   (with props)
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java   (with props)
Modified:
    felix/sandbox/http-base-r7/pom.xml
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/FilterInfo.java
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java
    felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java

Modified: felix/sandbox/http-base-r7/pom.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/pom.xml?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/pom.xml (original)
+++ felix/sandbox/http-base-r7/pom.xml Fri Aug 26 14:53:49 2016
@@ -73,16 +73,16 @@
             <artifactId>osgi.core</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.http.api</artifactId>
             <version>3.0.1-R7-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+        </dependency>
+        <dependency>
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>jsr305</artifactId>
             <version>3.0.0</version>

Modified: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java (original)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/dispatch/Dispatcher.java Fri Aug 26 14:53:49 2016
@@ -77,10 +77,17 @@ public final class Dispatcher
             final WhiteboardManager mgr = this.whiteboardManager;
             if ( mgr != null )
             {
-                this.whiteboardManager.sessionDestroyed(session, ids);
+                mgr.sessionDestroyed(session, ids);
             }
         }
 
+        // invoke preprocessors
+        final WhiteboardManager mgr = this.whiteboardManager;
+        if ( mgr != null && !mgr.invokePreprocessors(req, res) )
+        {
+            return;
+        }
+
         // get full decoded path for dispatching
         // we can't use req.getRequestURI() or req.getRequestURL() as these are returning the encoded path
         String path = req.getServletPath();

Modified: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/FilterInfo.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/FilterInfo.java?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/FilterInfo.java (original)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/FilterInfo.java Fri Aug 26 14:53:49 2016
@@ -41,12 +41,6 @@ import org.osgi.service.http.whiteboard.
 public final class FilterInfo extends WhiteboardServiceInfo<Filter>
 {
     /**
-     * Properties starting with this prefix are passed as filter init parameters to the
-     * {@code init()} method of the filter.
-     */
-    private static final String FILTER_INIT_PREFIX = "filter.init.";
-
-    /**
      * The name of the filter.
      */
     private final String name;
@@ -104,7 +98,7 @@ public final class FilterInfo extends Wh
         this.servletNames = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_SERVLET);
         this.patterns = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN);
         this.regexs = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_REGEX);
-        this.initParams = getInitParams(ref, FILTER_INIT_PREFIX);
+        this.initParams = getInitParams(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX);
         String[] dispatcherNames = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_DISPATCHER);
         if (dispatcherNames != null && dispatcherNames.length > 0)
         {

Added: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java?rev=1757863&view=auto
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java (added)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java Fri Aug 26 14:53:49 2016
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.http.base.internal.runtime;
+
+import java.util.Map;
+
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
+import org.osgi.service.http.whiteboard.Preprocessor;
+
+/**
+ * Provides registration information for a {@link Preprocessor}.
+ * <p>
+ * This class only provides information used at registration time, and as such differs
+ * slightly from the corresponding DTO
+ * </p>
+ */
+public final class PreprocessorInfo extends WhiteboardServiceInfo<Preprocessor>
+{
+    /**
+     * The preprocessor initialization parameters as provided during registration of the preprocessor.
+     */
+    private final Map<String, String> initParams;
+
+    public PreprocessorInfo(final ServiceReference<Preprocessor> ref)
+    {
+        super(ref);
+        this.initParams = getInitParams(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_PREPROCESSOR_INIT_PARAM_PREFIX);
+    }
+
+    /**
+     * Returns an immutable map of the init parameters.
+     */
+    public Map<String, String> getInitParameters()
+    {
+        return initParams;
+    }
+}

Propchange: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/PreprocessorInfo.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Modified: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java (original)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/ServletInfo.java Fri Aug 26 14:53:49 2016
@@ -38,12 +38,6 @@ import org.osgi.service.http.whiteboard.
 public class ServletInfo extends WhiteboardServiceInfo<Servlet>
 {
     /**
-     * Properties starting with this prefix are passed as servlet init parameters to the
-     * {@code init()} method of the servlet.
-     */
-    private static final String SERVLET_INIT_PREFIX = "servlet.init.";
-
-    /**
      * The name of the servlet.
      */
     private final String name;
@@ -85,7 +79,7 @@ public class ServletInfo extends Whitebo
         this.errorPage = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_ERROR_PAGE);
         this.patterns = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN);
         this.asyncSupported = getBooleanProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED);
-        this.initParams = getInitParams(ref, SERVLET_INIT_PREFIX);
+        this.initParams = getInitParams(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_INIT_PARAM_PREFIX);
         this.isResource = false;
         this.prefix = null;
     }

Modified: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java (original)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/FailedDTOHolder.java Fri Aug 26 14:53:49 2016
@@ -26,12 +26,14 @@ import org.apache.felix.http.base.intern
 import org.apache.felix.http.base.internal.runtime.AbstractInfo;
 import org.apache.felix.http.base.internal.runtime.FilterInfo;
 import org.apache.felix.http.base.internal.runtime.ListenerInfo;
+import org.apache.felix.http.base.internal.runtime.PreprocessorInfo;
 import org.apache.felix.http.base.internal.runtime.ResourceInfo;
 import org.apache.felix.http.base.internal.runtime.ServletContextHelperInfo;
 import org.apache.felix.http.base.internal.runtime.ServletInfo;
 import org.osgi.service.http.runtime.dto.FailedErrorPageDTO;
 import org.osgi.service.http.runtime.dto.FailedFilterDTO;
 import org.osgi.service.http.runtime.dto.FailedListenerDTO;
+import org.osgi.service.http.runtime.dto.FailedPreprocessorDTO;
 import org.osgi.service.http.runtime.dto.FailedResourceDTO;
 import org.osgi.service.http.runtime.dto.FailedServletContextDTO;
 import org.osgi.service.http.runtime.dto.FailedServletDTO;
@@ -49,14 +51,16 @@ public final class FailedDTOHolder
 
     public final List<FailedErrorPageDTO> failedErrorPageDTOs = new ArrayList<FailedErrorPageDTO>();
 
-    public final List<FailedServletContextDTO> failedServletContextDTO = new ArrayList<FailedServletContextDTO>();
+    public final List<FailedServletContextDTO> failedServletContextDTOs = new ArrayList<FailedServletContextDTO>();
+
+    public final List<FailedPreprocessorDTO> failedPreprocessorDTOs = new ArrayList<FailedPreprocessorDTO>();
 
     public void add(final AbstractInfo<?> info, final long contextId, final int failureCode)
     {
         if (info instanceof ServletContextHelperInfo)
         {
             final FailedServletContextDTO dto = (FailedServletContextDTO)ServletContextDTOBuilder.build((ServletContextHelperInfo)info, null, failureCode);
-            this.failedServletContextDTO.add(dto);
+            this.failedServletContextDTOs.add(dto);
         }
         else if (info instanceof ServletInfo )
         {
@@ -105,6 +109,11 @@ public final class FailedDTOHolder
             dto.servletContextId = contextId;
             this.failedListenerDTOs.add(dto);
         }
+        else if ( info instanceof PreprocessorInfo )
+        {
+            final FailedPreprocessorDTO dto = (FailedPreprocessorDTO)PreprocessorDTOBuilder.build((PreprocessorInfo) info, failureCode);
+            this.failedPreprocessorDTOs.add(dto);
+        }
         else
         {
             SystemLogger.error("Unsupported info type: " + info.getClass(), null);

Added: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java?rev=1757863&view=auto
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java (added)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java Fri Aug 26 14:53:49 2016
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.http.base.internal.runtime.dto;
+
+import javax.annotation.Nonnull;
+
+import org.apache.felix.http.base.internal.runtime.PreprocessorInfo;
+import org.osgi.service.http.runtime.dto.FailedPreprocessorDTO;
+import org.osgi.service.http.runtime.dto.PreprocessorDTO;
+
+public final class PreprocessorDTOBuilder
+{
+
+    /**
+     * Build a preprocessor DTO from a filter info
+     * @param info The preprocessor info
+     * @return A preprocessor DTO
+     */
+    public static @Nonnull PreprocessorDTO build(@Nonnull final PreprocessorInfo info, final int reason)
+    {
+        final PreprocessorDTO dto = (reason != -1 ? new FailedPreprocessorDTO() : new PreprocessorDTO());
+
+        dto.initParams = info.getInitParameters();
+        dto.serviceId = info.getServiceId();
+
+        if ( reason != -1 )
+        {
+            ((FailedPreprocessorDTO)dto).failureReason = reason;
+        }
+
+        return dto;
+    }
+}

Propchange: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/PreprocessorDTOBuilder.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Modified: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java (original)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/runtime/dto/RuntimeDTOBuilder.java Fri Aug 26 14:53:49 2016
@@ -30,6 +30,7 @@ import org.osgi.service.http.runtime.Htt
 import org.osgi.service.http.runtime.dto.FailedErrorPageDTO;
 import org.osgi.service.http.runtime.dto.FailedFilterDTO;
 import org.osgi.service.http.runtime.dto.FailedListenerDTO;
+import org.osgi.service.http.runtime.dto.FailedPreprocessorDTO;
 import org.osgi.service.http.runtime.dto.FailedResourceDTO;
 import org.osgi.service.http.runtime.dto.FailedServletContextDTO;
 import org.osgi.service.http.runtime.dto.FailedServletDTO;
@@ -58,8 +59,9 @@ public final class RuntimeDTOBuilder
         runtimeDTO.failedFilterDTOs = registry.getFailedDTOHolder().failedFilterDTOs.toArray(new FailedFilterDTO[registry.getFailedDTOHolder().failedFilterDTOs.size()]);
         runtimeDTO.failedListenerDTOs = registry.getFailedDTOHolder().failedListenerDTOs.toArray(new FailedListenerDTO[registry.getFailedDTOHolder().failedListenerDTOs.size()]);
         runtimeDTO.failedResourceDTOs = registry.getFailedDTOHolder().failedResourceDTOs.toArray(new FailedResourceDTO[registry.getFailedDTOHolder().failedResourceDTOs.size()]);
-        runtimeDTO.failedServletContextDTOs = registry.getFailedDTOHolder().failedServletContextDTO.toArray(new FailedServletContextDTO[registry.getFailedDTOHolder().failedServletContextDTO.size()]);
+        runtimeDTO.failedServletContextDTOs = registry.getFailedDTOHolder().failedServletContextDTOs.toArray(new FailedServletContextDTO[registry.getFailedDTOHolder().failedServletContextDTOs.size()]);
         runtimeDTO.failedServletDTOs = registry.getFailedDTOHolder().failedServletDTOs.toArray(new FailedServletDTO[registry.getFailedDTOHolder().failedServletDTOs.size()]);
+        runtimeDTO.failedPreprocessorDTOs = registry.getFailedDTOHolder().failedPreprocessorDTOs.toArray(new FailedPreprocessorDTO[registry.getFailedDTOHolder().failedPreprocessorDTOs.size()]);
 
         return runtimeDTO;
     }

Modified: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java?rev=1757863&r1=1757862&r2=1757863&view=diff
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java (original)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java Fri Aug 26 14:53:49 2016
@@ -36,6 +36,8 @@ import javax.annotation.Nonnull;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpSessionEvent;
 
@@ -55,6 +57,7 @@ import org.apache.felix.http.base.intern
 import org.apache.felix.http.base.internal.runtime.AbstractInfo;
 import org.apache.felix.http.base.internal.runtime.FilterInfo;
 import org.apache.felix.http.base.internal.runtime.ListenerInfo;
+import org.apache.felix.http.base.internal.runtime.PreprocessorInfo;
 import org.apache.felix.http.base.internal.runtime.ResourceInfo;
 import org.apache.felix.http.base.internal.runtime.ServletContextHelperInfo;
 import org.apache.felix.http.base.internal.runtime.ServletInfo;
@@ -583,6 +586,11 @@ public final class WhiteboardManager
         {
             if ( info.isValid() )
             {
+                if ( info instanceof PreprocessorInfo )
+                {
+                    // TODO
+                    return true;
+                }
                 synchronized ( this.contextMap )
                 {
                     final List<WhiteboardContextHandler> handlerList = this.getMatchingContexts(info);
@@ -636,6 +644,11 @@ public final class WhiteboardManager
         {
             if ( !failureStateHandler.remove(info) )
             {
+                if ( info instanceof PreprocessorInfo )
+                {
+                    // TODO
+                    return;
+                }
                 final List<WhiteboardContextHandler> handlerList = this.servicesMap.remove(info);
                 if ( handlerList != null )
                 {
@@ -884,4 +897,17 @@ public final class WhiteboardManager
 
         return new RegistryRuntime(failedDTOHolder, contextDTOs);
     }
+
+    /**
+     * Invoke all preprocessors
+     *
+     * @param req The request
+     * @param res The response
+     * @return {@code true} to continue with dispatching, {@code false} to terminate the request.
+     */
+    public boolean invokePreprocessors(final HttpServletRequest req, final HttpServletResponse res)
+    {
+        // TODO Auto-generated method stub
+        return true;
+    }
 }

Added: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java
URL: http://svn.apache.org/viewvc/felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java?rev=1757863&view=auto
==============================================================================
--- felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java (added)
+++ felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java Fri Aug 26 14:53:49 2016
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.http.base.internal.whiteboard.tracker;
+
+import org.apache.felix.http.base.internal.runtime.PreprocessorInfo;
+import org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo;
+import org.apache.felix.http.base.internal.whiteboard.WhiteboardManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.whiteboard.Preprocessor;
+
+public final class PreprocessorTracker extends WhiteboardServiceTracker<Preprocessor>
+{
+
+   /**
+     * Create a new tracker
+     * @param contextManager The context manager
+     * @param bundleContext The bundle context.
+     * @param filterExpr The filter expression for the services to track
+     */
+    public PreprocessorTracker(final WhiteboardManager contextManager,
+            final BundleContext bundleContext, final String filterExpr)
+    {
+        super(contextManager, bundleContext, String.format("(objectClass=%s)",
+                Preprocessor.class.getName()));
+    }
+
+    @Override
+    protected WhiteboardServiceInfo<Preprocessor> getServiceInfo(final ServiceReference<Preprocessor> ref) {
+        return new PreprocessorInfo(ref);
+    }
+}

Propchange: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/http-base-r7/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/PreprocessorTracker.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url