Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6CC57200B72 for ; Fri, 26 Aug 2016 16:04:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6B7C1160AC3; Fri, 26 Aug 2016 14:04:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 666FF160AB0 for ; Fri, 26 Aug 2016 16:04:07 +0200 (CEST) Received: (qmail 51654 invoked by uid 500); 26 Aug 2016 14:04:06 -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 51645 invoked by uid 99); 26 Aug 2016 14:04:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2016 14:04:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 37DE51A57EB for ; Fri, 26 Aug 2016 14:04:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.374 X-Spam-Level: X-Spam-Status: No, score=0.374 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id WZG_wKNgvBxz for ; Fri, 26 Aug 2016 14:04:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C17CE5F610 for ; Fri, 26 Aug 2016 14:04:01 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D11A1E0423 for ; Fri, 26 Aug 2016 14:04:00 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D45753A0248 for ; Fri, 26 Aug 2016 14:03:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1757855 - in /felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http: runtime/dto/ whiteboard/ Date: Fri, 26 Aug 2016 14:03:59 -0000 To: commits@felix.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160826140359.D45753A0248@svn01-us-west.apache.org> archived-at: Fri, 26 Aug 2016 14:04:08 -0000 Author: cziegeler Date: Fri Aug 26 14:03:59 2016 New Revision: 1757855 URL: http://svn.apache.org/viewvc?rev=1757855&view=rev Log: Update http whiteboard api Added: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java (with props) felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java (with props) Modified: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/RuntimeDTO.java felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/Preprocessor.java Added: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java URL: http://svn.apache.org/viewvc/felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java?rev=1757855&view=auto ============================================================================== --- felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java (added) +++ felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java Fri Aug 26 14:03:59 2016 @@ -0,0 +1,38 @@ +/* + * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved. + * + * Licensed 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.osgi.service.http.runtime.dto; + +/** + * Represents a preprocessor service which is currently not being used due to a + * problem. + * + * @NotThreadSafe + * @author $Id$ + * @since 1.1 + */ +public class FailedPreprocessorDTO extends PreprocessorDTO { + + /** + * The reason why the preprocessor represented by this DTO is not used. + * + * @see DTOConstants#FAILURE_REASON_UNKNOWN + * @see DTOConstants#FAILURE_REASON_EXCEPTION_ON_INIT + * @see DTOConstants#FAILURE_REASON_SERVICE_NOT_GETTABLE + */ + public int failureReason; + +} Propchange: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/FailedPreprocessorDTO.java ------------------------------------------------------------------------------ svn:keywords = author date id revision rev url Added: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java URL: http://svn.apache.org/viewvc/felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java?rev=1757855&view=auto ============================================================================== --- felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java (added) +++ felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java Fri Aug 26 14:03:59 2016 @@ -0,0 +1,51 @@ +/* + * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved. + * + * Licensed 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.osgi.service.http.runtime.dto; + +import java.util.Map; + +import org.osgi.dto.DTO; + +/** + * Represents a preprocessor + * {@code org.osgi.service.http.whiteboard.Preprocessor} service currently being + * used during request processing. + * + * @NotThreadSafe + * @author $Id$ + * @since 1.1 + */ +public class PreprocessorDTO extends DTO { + + /** + * The preprocessor initialization parameters as provided during + * registration of the preprocessor. Additional parameters like the Http + * Service Runtime attributes are not included. If the preprocessor has not + * initialization parameters, this map is empty. + */ + public Map initParams; + + /** + * Service property identifying the preprocessor. In the case of a + * preprocessor registered in the service registry and picked up by a Http + * Whiteboard Implementation, this value is not negative and corresponds to + * the service id in the registry. If the preprocessor has not been + * registered in the service registry, the value is negative and a unique + * negative value is generated by the Http Service Runtime in this case. + */ + public long serviceId; +} Propchange: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/PreprocessorDTO.java ------------------------------------------------------------------------------ svn:keywords = author date id revision rev url Modified: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/RuntimeDTO.java URL: http://svn.apache.org/viewvc/felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/RuntimeDTO.java?rev=1757855&r1=1757854&r2=1757855&view=diff ============================================================================== --- felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/RuntimeDTO.java (original) +++ felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/runtime/dto/RuntimeDTO.java Fri Aug 26 14:03:59 2016 @@ -35,17 +35,28 @@ public class RuntimeDTO extends DTO { public ServiceReferenceDTO serviceDTO; /** + * Returns the representations of the + * {@code org.osgi.service.http.whiteboard.Preprocessor} objects used by the + * Http Service Runtime. The returned array may be empty if the Http Service + * Runtime is currently not using any + * {@code org.osgi.service.http.whiteboard.Preprocessor} objects. + * + * @since 1.1.0 + */ + public PreprocessorDTO[] preprocessorDTOs; + + /** * Returns the representations of the {@code javax.servlet.ServletContext} * objects used by the Http Service Runtime. The returned array may be empty * if the Http Service Runtime is currently not using any * {@code javax.servlet.ServletContext} objects. */ - public ServletContextDTO[] servletContextDTOs; + public ServletContextDTO[] servletContextDTOs; /** - * Returns the representations of the {@code javax.servlet.ServletContext} objects - * currently not used by the Http service runtime due to some problem. - * The returned array may be empty. + * Returns the representations of the {@code javax.servlet.ServletContext} + * objects currently not used by the Http service runtime due to some + * problem. The returned array may be empty. */ public FailedServletContextDTO[] failedServletContextDTOs; @@ -64,9 +75,17 @@ public class RuntimeDTO extends DTO { public FailedResourceDTO[] failedResourceDTOs; /** - * Returns the representations of the servlet {@code javax.servlet.Filter} - * services associated with this runtime but currently not used due to some - * problem. The returned array may be empty. + * Returns the representations of the servlet + * {@code org.osgi.service.http.whiteboard.Preprocessor} services associated + * with this runtime but currently not used due to some problem. The + * returned array may be empty. + */ + public FailedPreprocessorDTO[] failedPreprocessorDTOs; + + /** + * Returns the representations of the {@code javax.servlet.Filter} services + * associated with this runtime but currently not used due to some problem. + * The returned array may be empty. */ public FailedFilterDTO[] failedFilterDTOs; Modified: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java URL: http://svn.apache.org/viewvc/felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java?rev=1757855&r1=1757854&r2=1757855&view=diff ============================================================================== --- felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java (original) +++ felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/HttpWhiteboardConstants.java Fri Aug 26 14:03:59 2016 @@ -409,6 +409,22 @@ public final class HttpWhiteboardConstan public static final String HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX = "filter.init."; /** + * Service property prefix referencing a {@link Preprocessor} service. + *

+ * For {@link Preprocessor} services this prefix can be used for service + * properties to mark them as initialization parameters which can be + * retrieved from the associated filter configuration. The prefix is removed + * from the service property name to build the initialization parameter + * name. + *

+ * For {@link Preprocessor} services, the value of each initialization + * parameter service property must be of type {@code String}. + * + * @since 1.1 + */ + public static final String HTTP_WHITEBOARD_PREPROCESSOR_INIT_PARAM_PREFIX = "preprocessor.init."; + + /** * Service property to mark a Listener service as a Whiteboard service. * Listener services with this property set to the string value "true" will * be treated as Whiteboard services opting in to being handled by the Http @@ -416,7 +432,6 @@ public final class HttpWhiteboardConstan * is opting out and this case is treated exactly the same as if this * property is missing. If an invalid value is specified this is treated as * a failure. - * *

* The value of this service property must be of type {@code String}. Valid * values are "true" and "false" ignoring case. Modified: felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/Preprocessor.java URL: http://svn.apache.org/viewvc/felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/Preprocessor.java?rev=1757855&r1=1757854&r2=1757855&view=diff ============================================================================== --- felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/Preprocessor.java (original) +++ felix/sandbox/http-api-r7/src/main/java/org/osgi/service/http/whiteboard/Preprocessor.java Fri Aug 26 14:03:59 2016 @@ -43,8 +43,8 @@ import org.osgi.annotation.versioning.Co * processing and directly generate a response. *

* Service properties with the prefix - * {@code HttpWhiteboardConstants#HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX} are - * passed as init parameters to this service. + * {@code HttpWhiteboardConstants#HTTP_WHITEBOARD_PREPROCESSOR_INIT_PARAM_PREFIX} + * are passed as init parameters to this service. * * @ThreadSafe * @author $Id$