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 TypeMethodDescriptionvoidregisterFilter(String alias, javax.servlet.Filter filter, Dictionary<String, String> initparams, HttpContext context) voidunregisterFilter(javax.servlet.Filter filter) Unregisters a previous filter registration done by theregisterFiltermethods.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 ornullif there are none. This argument is used by the filter'sFilterConfigobject.context- theHttpContextobject for the registered filter, ornullif a defaultHttpContextis to be created and used.- Throws:
javax.servlet.ServletException- if the filter'sinitmethod 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 theregisterFiltermethods.After this call, the registered filter will no longer be available. The Http Service must call the
destroymethod 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, thedestroymethod 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 thedestroymethod of the filter to be called. This can be done in theBundleActivator.stopmethod 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.
-