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

org.eclipse.equinox.http.servlet.ExtendedHttpService Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2011, 2014 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Raymond Augé  - Bug 436698
 *******************************************************************************/
package org.eclipse.equinox.http.servlet;

import java.util.Dictionary;
import javax.servlet.Filter;
import javax.servlet.ServletException;
import org.osgi.annotation.versioning.ProviderType;
import org.osgi.service.http.*;

/**
 * @since 1.1
 * @noimplement This interface is not intended to be implemented by clients.
 */
@ProviderType
public interface ExtendedHttpService extends HttpService {

	/**
	 * @param alias name in the URI namespace at which the filter is registered
	 * @param filter the filter object to register
	 * @param initparams initialization arguments for the filter or
	 *        null if there are none. This argument is used by the
	 *        filter's FilterConfig object.
	 * @param context the HttpContext object for the registered
	 *        filter, or null if a default HttpContext is
	 *        to be created and used.
	 * @throws javax.servlet.ServletException if the filter's init
	 *            method throws an exception, or the given filter object has
	 *            already been registered at a different alias.
	 * @throws java.lang.IllegalArgumentException if any of the arguments are
	 *            invalid
	 */
	public void registerFilter(String alias, Filter filter, Dictionary initparams, HttpContext context) throws ServletException, NamespaceException;

	/**
	 * Unregisters a previous filter registration done by the
	 * registerFilter methods.
	 *
	 * 

* After this call, the registered filter will no * longer be available. The Http Service must call the destroy * method of the filter before returning. *

* If the bundle which performed the registration is stopped or otherwise * "unget"s the Http Service without calling {@link #unregisterFilter} then the Http * Service must automatically unregister the filter registration. However, the * destroy method of the filter will not be called in this case since * the bundle may be stopped. * {@link #unregisterFilter} must be explicitly called to cause the * destroy method of the filter to be called. This can be done * in the BundleActivator.stop method of the * bundle registering the filter. * * @param filter the filter object to unregister * @throws java.lang.IllegalArgumentException if there is no registration * for the filter or the calling bundle was not the bundle which * registered the filter. */ public void unregisterFilter(Filter filter); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy