Package org.opendaylight.aaa.web.osgi
Class WhiteboardWebServer
java.lang.Object
org.opendaylight.aaa.web.osgi.WhiteboardWebServer
- All Implemented Interfaces:
WebServer
WebServer
implementation based on
OSGi HTTP Whiteboard.-
Constructor Summary
ConstructorsConstructorDescriptionWhiteboardWebServer
(org.osgi.service.component.ComponentContext componentContext) Construct aWhiteboardWebServer
to aComponentContext
. -
Method Summary
Modifier and TypeMethodDescriptionGet base URL of this web server, without any contexts.registerWebContext
(WebContext webContext) Register a new web context.
-
Constructor Details
-
WhiteboardWebServer
public WhiteboardWebServer(org.osgi.service.component.ComponentContext componentContext) Construct aWhiteboardWebServer
to aComponentContext
.- Parameters:
componentContext
- AComponentContext
-
-
Method Details
-
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 interfaceWebServer
- Returns:
- base URL, with http[s] prefix and port, NOT ending in slash
-
registerWebContext
Description copied from interface:WebServer
Register a new web context.- Specified by:
registerWebContext
in interfaceWebServer
- 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
-