All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.felix.http.whiteboard.HttpWhiteboardConstants Maven / Gradle / Ivy

/*
 * 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.whiteboard;

/**
 * The HttpWhiteboardConstants defines constants for values
 * used by the Http Whiteboard registration support.
 *
 * @since Http Whiteboard Bundle 2.3.0
 * @deprecated Use the OSGi Http Whiteboard Service instead
 */
@Deprecated
public class HttpWhiteboardConstants
{

    /**
     * The service registration property indicating the name of a
     * HttpContext service.
     * 

* If the property is set to a non-empty string for an * HttpContext service it indicates the name by which it may be * referred to by Servlet and Filter services. * This is also a required registration property for * HttpService services to be accepted by the Http Whiteboard * registration. *

* If the property is set for a Servlet or Filter * services it indicates the name of a registered HttpContext * which is to be used for the registration with the Http Service. If the * property is not set for a Servlet or Filter * services or its value is the empty string, a default HttpContext is used * which does no security handling and has no MIME type support and which * returns resources from the servlet's or the filter's bundle. *

* The value of this service registration property is a single string. */ public static final String CONTEXT_ID = "contextId"; /** * The service registration property indicating whether a * HttpContext service registered with the {@link #CONTEXT_ID} * service registration * property is shared across bundles or not. By default * HttpContext services are only available to * Servlet and Filter services registered by the * same bundle. *

* If this property is set to true for HttpContext * service, it may be referred to by Servlet or * Filter services from different bundles. *

* Recommendation: Shared HttpContext services should * either not implement the getResource at all or be registered * as service factories to ensure no access to foreign bundle resources is * not allowed through this backdoor. *

* The value of this service registration is a single boolean or string. * Only if the boolean value is true (either by * Boolean.booleanValue() or by * Boolean.valueOf(String)) will the HttpContext * be shared. */ public static final String CONTEXT_SHARED = "context.shared"; /** * The service registration property indicating the registration alias * for a Servlet service. This value is used as the * alias parameter for the HttpService.registerServlet call. *

* A Servlet service registered with this service property may * also provide a {@link #CONTEXT_ID} property which referrs to a * HttpContext service. If such a service is not registered * (yet), the servlet will not be registered with the Http Service. Once the * HttpContext service becomes available, the servlet is * registered. *

* The value of this service registration property is a single string * starting with a slash. */ public static final String ALIAS = "alias"; /** * The service registration property indicating the URL patter * for a Filter service. This value is used as the * pattern parameter for the ExtHttpService.registerFilter * call. *

* A Filter service registered with this service property may * also provide a {@link #CONTEXT_ID} property which referrs to a * HttpContext service. If such a service is not registered * (yet), the filter will not be registered with the Http Service. Once the * HttpContext service becomes available, the filter is * registered. *

* The value of this service registration property is a single string being * a regular expression. *

* Note: Filter services are only supported if the Http * Service implements the * org.apache.felix.http.api.ExtHttpService interface. */ public static final String PATTERN = "pattern"; /** * Prefix for service registration properties being used as init parameters * for the Servlet and Filter initialization. */ public static final String INIT_PREFIX = "init."; // no instances private HttpWhiteboardConstants() { } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy