LPS-32742 Extend the HttpService specs to allow registering multiple aliases for a servlet at a time. This will allow us to follow the Servlet specs, having an unique instance per servlet
LPS-32742 Use a dictionary instead of a hmap since at the end we end up calling an OSGi API which is using the former
LPS-32742 Include the new behaviour added to the ExtHttpService. We are allowing to register multiple servlet mappings under the same servlet instance (as Servlet specs dictates). This is an extension to the HttpService (which is worth to extend since we are trying to implement the WAB specs). We store a map where multiple alias maps to the unique servlet instance in order to do an efficient lookup when doing the dispatching (which will be pushed as soon as possible)
LPS-32742 The service tracker is the responsible for registering the servlets specified in the configuration files. Let's make it to follow the specs in our ExtendedHttpService so we have an unique servlet instance in our bundle servlet context
LPS-32742 I'm choosing to keep the param names for filters and servlet as as close as possible. In web.xml, they both use the "url-pattern" element. So instead of calling them aliases, I'm going to use the urlPatterns var, even though it may not be consistent with OSGi, because we are choosing to be consistent with the Servlet spec instead.
LPS-32742 Move the single param _validate method inside the _validate(Servlet…) method because this logic will not work for filters. Servlet url patterns must be unique, but filter url patterns may not be unique, so this method will most likely not be reused (so no need for abstraction), but if I'm wrong, please re-abstract it back out.
LPS-32742 Two servlets cannot have more than name.
LPS-32742 This abstraction doesn't really buy us much for now (if I'm wrong, please reabstract)
LPS-32742 Make error messages consistent
LPS-32742 Make it super clear what is being passed through
LPS-32742 Just cast it once
LPS-32742 Make the API more consistent between Filters and Servlets, that means we are not going to use the default HttpService from OSGi where it expects an "alias" only. We will always expect a servletName and a URL pattern.
LPS-32742 Since we're not using the OSGi method, we can go back to modern Maps
LPS-32742 We need to map one servlet to many url patterns, but map one servlet to one servlet name
LPS-32742 This check is wrong, URL pattern can allow the same servlet to be registered to different URLs
LPS-32742 This checks are not needed because they can never happen based on how we wire everything
LPS-32742 Add unregistering servlets
LPS-32742 Add validateFilter. It's different from validateServlet because URL patterns for filters can contain multiple filters.
LPS-32742 Add unregisterFilter. Also track filter to url patterns so we can have better log messages.
LPS-32742 Add registerFilter impl