public class WebAppStarter extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static Map<String,String> |
INIT_PARAMS |
(package private) static String |
PARAM_PLUGIN_NAME |
Constructor and Description |
---|
WebAppStarter() |
Modifier and Type | Method and Description |
---|---|
(package private) static WebAppContext |
addWebApp(RouterContext ctx,
ContextHandlerCollection server,
String appName,
String warPath,
File tmpdir)
add but don't start
This is used only by RouterConsoleRunner, which adds all the webapps first
and then starts all at once.
|
static ContextHandlerCollection |
getConsoleServer(I2PAppContext ctx)
See comments in ConfigClientsHandler
Warning, this will NOT work during shutdown, because
the console is already unregistered.
|
(package private) static ContextHandler |
getWebApp(I2PAppContext ctx,
String appName)
Warning, this will NOT work during shutdown, because
the console is already unregistered.
|
(package private) static ContextHandler |
getWebApp(Server s,
String appName) |
static boolean |
isWebAppRunning(I2PAppContext ctx,
String appName)
As of 0.9.34, the appName will be registered with the PortMapper,
and PortMapper.isRegistered() will be more efficient than this.
|
(package private) static boolean |
isWebAppRunning(Server s,
String appName) |
(package private) static void |
setWebAppConfiguration(WebAppContext wac,
boolean scanAnnotations) |
static void |
startWebApp(RouterContext ctx,
ContextHandlerCollection server,
String appName,
String warPath)
Adds and starts.
|
static void |
startWebApp(RouterContext ctx,
ContextHandlerCollection server,
String appName,
String warPath,
String pluginName)
Adds and starts.
|
(package private) static void |
stopWebApp(RouterContext ctx,
Server s,
String appName)
Stop it and remove the context.
|
static void |
stopWebApp(RouterContext ctx,
String appName)
Stop it and remove the context.
|
static final String PARAM_PLUGIN_NAME
public static void startWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath) throws Exception
Exception
- just about anything, caller would be wise to catch Throwablepublic static void startWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath, String pluginName) throws Exception
pluginName
- may be null, will look for console/webapps.config in that pluginException
- just about anything, caller would be wise to catch Throwablestatic WebAppContext addWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath, File tmpdir) throws IOException
IOException
static void setWebAppConfiguration(WebAppContext wac, boolean scanAnnotations)
scanAnnotations
- Should we check for Servlet 3.0 annotations?
The war MUST be set to extract (due to Jetty bug),
and annotation classes MUST be availablepublic static void stopWebApp(RouterContext ctx, String appName)
static void stopWebApp(RouterContext ctx, Server s, String appName)
public static boolean isWebAppRunning(I2PAppContext ctx, String appName)
static ContextHandler getWebApp(I2PAppContext ctx, String appName)
static ContextHandler getWebApp(Server s, String appName)
public static ContextHandlerCollection getConsoleServer(I2PAppContext ctx)