felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
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 GMT
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<String, String>	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.
+	 * <p>
+	 * 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.
+	 * <p>
+	 * 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.
-	 * 
 	 * <p>
 	 * 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.
  * <p>
  * 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$



Mime
View raw message