Eclipse Platform
Release 3.6

org.eclipse.equinox.http.servlet
Interface ExtendedHttpService

All Superinterfaces:
HttpService

public interface ExtendedHttpService
extends HttpService

Since:
1.1

Method Summary
 void registerFilter(String alias, javax.servlet.Filter filter, Dictionary initparams, HttpContext context)
           
 void unregisterFilter(javax.servlet.Filter filter)
          Unregisters a previous filter registration done by the registerFilter method.
 
Methods inherited from interface org.osgi.service.http.HttpService
createDefaultHttpContext, registerResources, registerServlet, unregister
 

Method Detail

registerFilter

void registerFilter(String alias,
                    javax.servlet.Filter filter,
                    Dictionary initparams,
                    HttpContext context)
                    throws javax.servlet.ServletException,
                           NamespaceException
Parameters:
alias - name in the URI namespace at which the filter is registered
filter - the filter object to register
initparams - initialization arguments for the filter or null if there are none. This argument is used by the filter's FilterConfig object.
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.
IllegalArgumentException - if any of the arguments are invalid
NamespaceException

unregisterFilter

void unregisterFilter(javax.servlet.Filter filter)
Unregisters a previous filter registration done by the registerFilter method.

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 unregisterFilter(javax.servlet.Filter) 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. unregisterFilter(javax.servlet.Filter) 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.

Parameters:
filter - the filter object to unregister
Throws:
IllegalArgumentException - if there is no registration for the filter or the calling bundle was not the bundle which registered the filter.

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.