Return-Path: X-Original-To: apmail-felix-commits-archive@www.apache.org Delivered-To: apmail-felix-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AAE3D10F5F for ; Mon, 27 Apr 2015 14:22:44 +0000 (UTC) Received: (qmail 29654 invoked by uid 500); 27 Apr 2015 14:22:44 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 29612 invoked by uid 500); 27 Apr 2015 14:22:44 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 29602 invoked by uid 99); 27 Apr 2015 14:22:44 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 14:22:44 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 6993AAC0179 for ; Mon, 27 Apr 2015 14:22:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1676273 - in /felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal: handler/PerContextHandlerRegistry.java handler/ServletHandlerRegistry.java service/HttpServiceFactory.java whiteboard/WhiteboardManager.java Date: Mon, 27 Apr 2015 14:22:44 -0000 To: commits@felix.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150427142244.6993AAC0179@hades.apache.org> Author: cziegeler Date: Mon Apr 27 14:22:43 2015 New Revision: 1676273 URL: http://svn.apache.org/r1676273 Log: Update to latest http whiteboard api Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PerContextHandlerRegistry.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRegistry.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PerContextHandlerRegistry.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PerContextHandlerRegistry.java?rev=1676273&r1=1676272&r2=1676273&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PerContextHandlerRegistry.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PerContextHandlerRegistry.java Mon Apr 27 14:22:43 2015 @@ -17,7 +17,7 @@ package org.apache.felix.http.base.internal.handler; import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_EXCEPTION_ON_INIT; -import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SERVICE_ALREAY_USED; +import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SERVICE_IN_USE; import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE; import java.util.ArrayList; @@ -113,7 +113,7 @@ public final class PerContextHandlerRegi { if (this.filterMapping.contains(handler)) { - throw new RegistrationFailureException(handler.getFilterInfo(), FAILURE_REASON_SERVICE_ALREAY_USED, + throw new RegistrationFailureException(handler.getFilterInfo(), FAILURE_REASON_SERVICE_IN_USE, "Filter instance " + handler.getName() + " already registered"); } Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRegistry.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRegistry.java?rev=1676273&r1=1676272&r2=1676273&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRegistry.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRegistry.java Mon Apr 27 14:22:43 2015 @@ -18,7 +18,7 @@ package org.apache.felix.http.base.inter import static java.util.Arrays.asList; import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_EXCEPTION_ON_INIT; -import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SERVICE_ALREAY_USED; +import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SERVICE_IN_USE; import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SERVLET_CONTEXT_FAILURE; import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE; @@ -90,7 +90,7 @@ final class ServletHandlerRegistry { if (this.allServletHandlers.contains(handler)) { - throw new RegistrationFailureException(handler.getServletInfo(), FAILURE_REASON_SERVICE_ALREAY_USED, + throw new RegistrationFailureException(handler.getServletInfo(), FAILURE_REASON_SERVICE_IN_USE, "Servlet instance " + handler.getName() + " already registered"); } Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java?rev=1676273&r1=1676272&r2=1676273&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java Mon Apr 27 14:22:43 2015 @@ -173,10 +173,10 @@ public final class HttpServiceFactory this.httpServiceProps.clear(); this.httpServiceProps.putAll(props); - if ( this.httpServiceProps.get(HttpServiceRuntimeConstants.HTTP_SERVICE_ENDPOINT_ATTRIBUTE) != null ) + if ( this.httpServiceProps.get(HttpServiceRuntimeConstants.HTTP_SERVICE_ENDPOINT) != null ) { this.httpServiceProps.put(OBSOLETE_REG_PROPERTY_ENDPOINTS, - this.httpServiceProps.get(HttpServiceRuntimeConstants.HTTP_SERVICE_ENDPOINT_ATTRIBUTE)); + this.httpServiceProps.get(HttpServiceRuntimeConstants.HTTP_SERVICE_ENDPOINT)); } if (this.httpServiceReg != null) Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java?rev=1676273&r1=1676272&r2=1676273&view=diff ============================================================================== --- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java (original) +++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java Mon Apr 27 14:22:43 2015 @@ -133,8 +133,8 @@ public final class WhiteboardManager public void start(final ServletContext context) { // TODO set Endpoint - this.serviceRuntime.setAttribute(HttpServiceRuntimeConstants.HTTP_SERVICE_ID_ATTRIBUTE, - this.httpServiceFactory.getHttpServiceServiceId()); + this.serviceRuntime.setAttribute(HttpServiceRuntimeConstants.HTTP_SERVICE_ID, + Collections.singletonList(this.httpServiceFactory.getHttpServiceServiceId())); this.runtimeServiceReg = this.bundleContext.registerService(HttpServiceRuntime.class, serviceRuntime, this.serviceRuntime.getAttributes()); @@ -229,8 +229,8 @@ public final class WhiteboardManager if (this.runtimeServiceReg != null) { - this.serviceRuntime.setAttribute(HttpServiceRuntimeConstants.HTTP_SERVICE_ID_ATTRIBUTE, - this.httpServiceFactory.getHttpServiceServiceId()); + this.serviceRuntime.setAttribute(HttpServiceRuntimeConstants.HTTP_SERVICE_ID, + Collections.singletonList(this.httpServiceFactory.getHttpServiceServiceId())); this.runtimeServiceReg.setProperties(this.serviceRuntime.getAttributes()); } }