Package org.eclipse.equinox.http.servlet
Interface ExtendedHttpService
- All Superinterfaces:
HttpService
- All Known Implementing Classes:
HttpServiceImpl
- Since:
- 1.1
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 theregisterFilter
methods.Methods inherited from interface org.osgi.service.http.HttpService
createDefaultHttpContext, registerResources, registerServlet, unregister
-
Method Details
-
registerFilter
void registerFilter(String alias, javax.servlet.Filter filter, Dictionary<String, String> initparams, HttpContext context) throws javax.servlet.ServletException, NamespaceException- Parameters:
alias
- name in the URI namespace at which the filter is registeredfilter
- the filter object to registerinitparams
- initialization arguments for the filter ornull
if there are none. This argument is used by the filter'sFilterConfig
object.context
- theHttpContext
object for the registered filter, ornull
if a defaultHttpContext
is to be created and used.- Throws:
javax.servlet.ServletException
- if the filter'sinit
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
-
unregisterFilter
void unregisterFilter(javax.servlet.Filter filter) Unregisters a previous filter registration done by theregisterFilter
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, thedestroy
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 thedestroy
method of the filter to be called. This can be done in theBundleActivator.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.
-