Class WhiteboardWebServer

java.lang.Object
org.opendaylight.aaa.web.osgi.WhiteboardWebServer
All Implemented Interfaces:
WebServer

@RequireHttpWhiteboard public final class WhiteboardWebServer extends Object implements WebServer
WebServer implementation based on OSGi HTTP Whiteboard.
  • Constructor Details

    • WhiteboardWebServer

      public WhiteboardWebServer(org.osgi.service.component.ComponentContext componentContext)
      Construct a WhiteboardWebServer to a ComponentContext.
      Parameters:
      componentContext - A ComponentContext
  • Method Details

    • getBaseURL

      public String getBaseURL()
      Description copied from interface: WebServer
      Get base URL of this web server, without any contexts.

      In production, this would likely be HTTPS with a well known hostname and fixed port configured. For example, in Karaf etc/ configuration file. In tests, this would be typically be HTTP on localhost and an arbitrarily chosen port.

      Specified by:
      getBaseURL in interface WebServer
      Returns:
      base URL, with http[s] prefix and port, NOT ending in slash
    • registerWebContext

      public Registration registerWebContext(WebContext webContext) throws javax.servlet.ServletException
      Description copied from interface: WebServer
      Register a new web context.
      Specified by:
      registerWebContext in interface WebServer
      Parameters:
      webContext - the web context
      Returns:
      registration which allows to close the context (and remove its servlets etc.)
      Throws:
      javax.servlet.ServletException - if registration of any of the components of the web context failed