Package org.ops4j.pax.web.service.whiteboard

This package of pax-web-api contains interfaces representing all the web components (or web elements) that can be registered within running HTTP/Servlet engine.

Pax Web provided Whiteboard approach before OSGi CMPN R6+ Whiteboard specification, so entire configuration of registered web elements (servlets, filters, ...) can be passed directly and not only as service properties (Whiteboard specification allows only the latter).

Summarizing, whiteboard implementation in Pax Web allows registration of:

  • actual javax.servlet elements (servlet, filters, ...), where additional configuration is specified as service registration properties - as described in OSGi CMPN Whiteboard specification.
  • OSGi services with interfaces (Constants.OBJECTCLASS) from this package. This method may be called explicit whiteboard approach and is specific to Pax Web itself.

Because internally, whiteboard and HttpService approaches are implemented in very similar fashion, these interfaces are used throughout entire Pax Web.

The Mapping suffix of names for interfaces from this package matches the convention taken from Jetty, but other containers also have similar concept groupping actual servlet with it's registration parameters:

  • org.eclipse.jetty.servlet.ServletMapping
  • org.apache.catalina.core.StandardWrapper
  • io.undertow.servlet.api.ServletInfo
So all interfaces representing registered element with additional parameters are called XxxMapping.