hudson
Class WebAppMain

java.lang.Object
  extended by hudson.WebAppMain
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public final class WebAppMain
extends Object
implements javax.servlet.ServletContextListener

Entry point when Hudson is used as a webapp.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class WebAppMain.FileAndDescription
          Add some metadata to a File, allowing to trace setup issues
 
Constructor Summary
WebAppMain()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
           
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Creates the sole instance of Jenkins and register it to the ServletContext.
 WebAppMain.FileAndDescription getHomeDir(javax.servlet.ServletContextEvent event)
          Determines the home directory for Jenkins.
static void installExpressionFactory(javax.servlet.ServletContextEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppMain

public WebAppMain()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Creates the sole instance of Jenkins and register it to the ServletContext.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

installExpressionFactory

public static void installExpressionFactory(javax.servlet.ServletContextEvent event)

getHomeDir

public WebAppMain.FileAndDescription getHomeDir(javax.servlet.ServletContextEvent event)
Determines the home directory for Jenkins.

We look for a setting that affects the smallest scope first, then bigger ones later.

People makes configuration mistakes, so we are trying to be nice with those by doing String.trim().

Returns:
the File alongside with some description to help the user troubleshoot issues

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener


Copyright © 2004-2013. All Rights Reserved.