public class HttpServer extends AbstractModule<HttpServerConfig>
Wrapper module for the HTTP server engine (Jetty for now)
Modifier and Type | Field and Description |
---|---|
static String |
TEST_MSG |
config, eventHandler
Constructor and Description |
---|
HttpServer() |
Modifier and Type | Method and Description |
---|---|
void |
addServletSecurity(String pathSpec,
String... roles) |
void |
cleanup()
Cleans up all ressources used by the module when deleted
All persistent resources created by the module should be cleaned
when this is called
|
void |
deployServlet(javax.servlet.http.HttpServlet servlet,
Map<String,String> initParams,
String... paths) |
void |
deployServlet(javax.servlet.http.HttpServlet servlet,
String path) |
static HttpServer |
getInstance() |
org.eclipse.jetty.server.Server |
getJettyServer() |
void |
start()
Starts the module with the current configuration.
init() should always be called before start(). |
void |
stop()
Stops the module.
All temporary resources created by the module should be cleaned when this is called (ex: memory, files, connections, etc.) stop() can be called right after init() even if start() hasn't been called. |
void |
undeployServlet(javax.servlet.http.HttpServlet servlet) |
void |
updateConfig(HttpServerConfig config)
Updates the module's configuration dynamically.
The module must honor this new configuration unless an error is detected. |
getConfiguration, getLocalID, getName, init, isEnabled, loadState, registerListener, saveState, unregisterListener
public static String TEST_MSG
public static HttpServer getInstance()
public void updateConfig(HttpServerConfig config) throws SensorHubException
IModule
updateConfig
in interface IModule<HttpServerConfig>
updateConfig
in class AbstractModule<HttpServerConfig>
SensorHubException
public void start() throws SensorHubException
IModule
SensorHubException
public void stop() throws SensorHubException
IModule
SensorHubException
public void deployServlet(javax.servlet.http.HttpServlet servlet, String path)
public void deployServlet(javax.servlet.http.HttpServlet servlet, Map<String,String> initParams, String... paths)
public void undeployServlet(javax.servlet.http.HttpServlet servlet)
public void cleanup() throws SensorHubException
IModule
SensorHubException
public org.eclipse.jetty.server.Server getJettyServer()
Copyright © 2015 Sensia Software LLC. All rights reserved.