public class HttpServiceImpl extends java.lang.Object implements ExtendedHttpService
| Constructor and Description |
|---|
HttpServiceImpl(Bundle bundle,
HttpServiceRuntimeImpl httpServiceRuntime) |
| Modifier and Type | Method and Description |
|---|---|
HttpContext |
createDefaultHttpContext() |
void |
registerFilter(java.lang.String alias,
Filter filter,
java.util.Dictionary<java.lang.String,java.lang.String> initparams,
HttpContext httpContext) |
void |
registerResources(java.lang.String alias,
java.lang.String name,
HttpContext httpContext) |
void |
registerServlet(java.lang.String alias,
Servlet servlet,
java.util.Dictionary initparams,
HttpContext httpContext) |
void |
unregister(java.lang.String alias) |
void |
unregisterFilter(Filter filter)
Unregisters a previous filter registration done by the
registerFilter methods. |
public HttpServiceImpl(Bundle bundle,
HttpServiceRuntimeImpl httpServiceRuntime)
public HttpContext createDefaultHttpContext()
HttpService#createDefaultHttpContext()public void registerFilter(java.lang.String alias,
Filter filter,
java.util.Dictionary<java.lang.String,java.lang.String> initparams,
HttpContext httpContext)
throws ServletException
registerFilter in interface ExtendedHttpServicealias - 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.httpContext - the HttpContext object for the registered
filter, or null if a default HttpContext is
to be created and used.ServletExceptionExtendedHttpService.registerFilter(String, Filter, Dictionary, HttpContext)public void registerResources(java.lang.String alias,
java.lang.String name,
HttpContext httpContext)
throws NamespaceException
NamespaceExceptionHttpService#registerResources(String, String, HttpContext)public void registerServlet(java.lang.String alias,
Servlet servlet,
java.util.Dictionary initparams,
HttpContext httpContext)
throws ServletException,
NamespaceException
ServletExceptionNamespaceExceptionHttpService#registerServlet(String, Servlet, Dictionary, HttpContext)public void unregister(java.lang.String alias)
HttpService#unregister(String)public void unregisterFilter(Filter filter)
ExtendedHttpServiceregisterFilter 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 ExtendedHttpService.unregisterFilter(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.
ExtendedHttpService.unregisterFilter(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.
unregisterFilter in interface ExtendedHttpServicefilter - the filter object to unregisterExtendedHttpService.unregisterFilter(Filter)