net.i2p.router.web
Class WebAppStarter

java.lang.Object
  extended by net.i2p.router.web.WebAppStarter

public class WebAppStarter
extends java.lang.Object

Add, start or stop a webapp. Add to the webapp classpath if specified in webapps.config. Sadly, setting Class-Path in MANIFEST.MF doesn't work for jetty wars. See WebAppConfiguration for more information. but let's just do it in webapps.config. No, wac.addClassPath() does not work. For more info see: http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support

Since:
0.7.12
Author:
zzz

Field Summary
(package private) static java.util.Map<java.lang.String,java.lang.Long> warModTimes
           
 
Constructor Summary
WebAppStarter()
           
 
Method Summary
(package private) static org.mortbay.jetty.servlet.WebApplicationContext addWebApp(I2PAppContext ctx, org.mortbay.jetty.Server server, java.lang.String appName, java.lang.String warPath, java.io.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.
(package private) static org.mortbay.jetty.Server getConsoleServer()
          see comments in ConfigClientsHandler
(package private) static boolean isWebAppRunning(java.lang.String appName)
           
(package private) static void startWebApp(I2PAppContext ctx, org.mortbay.jetty.Server server, java.lang.String appName, java.lang.String warPath)
          adds and starts
(package private) static void stopWebApp(org.mortbay.jetty.Server server, java.lang.String appName)
          stop it and remove the context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

warModTimes

static final java.util.Map<java.lang.String,java.lang.Long> warModTimes
Constructor Detail

WebAppStarter

public WebAppStarter()
Method Detail

startWebApp

static void startWebApp(I2PAppContext ctx,
                        org.mortbay.jetty.Server server,
                        java.lang.String appName,
                        java.lang.String warPath)
                 throws java.lang.Exception
adds and starts

Throws:
just - about anything, caller would be wise to catch Throwable
java.lang.Exception

addWebApp

static org.mortbay.jetty.servlet.WebApplicationContext addWebApp(I2PAppContext ctx,
                                                                 org.mortbay.jetty.Server server,
                                                                 java.lang.String appName,
                                                                 java.lang.String warPath,
                                                                 java.io.File tmpdir)
                                                          throws java.io.IOException
add but don't start This is used only by RouterConsoleRunner, which adds all the webapps first and then starts all at once.

Throws:
java.io.IOException

stopWebApp

static void stopWebApp(org.mortbay.jetty.Server server,
                       java.lang.String appName)
stop it and remove the context

Throws:
just - about anything, caller would be wise to catch Throwable

isWebAppRunning

static boolean isWebAppRunning(java.lang.String appName)

getConsoleServer

static org.mortbay.jetty.Server getConsoleServer()
see comments in ConfigClientsHandler