@ProviderType public interface ExtendedHttpService extends HttpService
Modifier and Type | Method and Description |
---|---|
void |
registerFilter(String alias,
javax.servlet.Filter filter,
Dictionary<String,String> initparams,
HttpContext context) |
void |
unregisterFilter(javax.servlet.Filter filter)
Unregisters a previous filter registration done by the
registerFilter methods. |
createDefaultHttpContext, registerResources, registerServlet, unregister
void registerFilter(String alias, javax.servlet.Filter filter, Dictionary<String,String> initparams, HttpContext context) throws javax.servlet.ServletException, NamespaceException
alias
- name in the URI namespace at which the filter is registeredfilter
- the filter object to registerinitparams
- 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.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
invalidNamespaceException
void unregisterFilter(javax.servlet.Filter filter)
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 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.
filter
- the filter object to unregisterIllegalArgumentException
- if there is no registration
for the filter or the calling bundle was not the bundle which
registered the filter.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.