com.caucho.resin
Class WebAppEmbed

java.lang.Object
  extended by com.caucho.resin.WebAppEmbed
Direct Known Subclasses:
WebAppLocalDeployEmbed

public class WebAppEmbed
extends java.lang.Object

Embeddable version of a Resin web-app.

 ResinEmbed resin = new ResinEmbed();

 WebAppEmbed webApp = new WebAppEmbed("/foo", "/var/www/foo");

 resin.addWebApp(webApp);
 


Constructor Summary
WebAppEmbed()
          Creates a new embedded webapp
WebAppEmbed(java.lang.String contextPath)
          Creates a new embedded webapp
WebAppEmbed(java.lang.String contextPath, java.lang.String rootDirectory)
          Creates a new embedded webapp
 
Method Summary
 void addBean(BeanEmbed bean)
          Adds a web bean.
 void addFilter(FilterEmbed filter)
          Adds a filter definition
 void addFilterMapping(FilterMappingEmbed filterMapping)
          Adds a filter-mapping definition
 void addServlet(ServletEmbed servlet)
          Adds a servlet definition
 void addServletMapping(ServletMappingEmbed servletMapping)
          Adds a servlet-mapping definition
protected  void configure(WebApp webApp)
          Configures the web-app (for internal use)
 java.lang.String getArchivePath()
          The path to the archive war file
 java.lang.String getContextPath()
          The context-path
 WebAppSingleDeployGenerator getDeployGenerator()
           
 java.lang.String getRootDirectory()
          The root directory of the expanded web-app
 WebApp getWebApp()
           
 void setArchivePath(java.lang.String archivePath)
          The path to the archive war file
 void setContextParam(java.lang.String name, java.lang.String value)
          Sets a context-param.
 void setContextPath(java.lang.String contextPath)
          The context-path
 void setDeployGenerator(WebAppSingleDeployGenerator deployGenerator)
           
 void setDisableStart(boolean isDisable)
          For cases like JSP compilation, skip the startup step.
 void setRootDirectory(java.lang.String rootDirectory)
          The root directory of the expanded web-app
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppEmbed

public WebAppEmbed()
Creates a new embedded webapp


WebAppEmbed

public WebAppEmbed(java.lang.String contextPath)
Creates a new embedded webapp

Parameters:
contextPath - the URL prefix of the web-app

WebAppEmbed

public WebAppEmbed(java.lang.String contextPath,
                   java.lang.String rootDirectory)
Creates a new embedded webapp

Parameters:
contextPath - the URL prefix of the web-app
rootDirectory - the root directory of the web-app
Method Detail

setContextPath

public void setContextPath(java.lang.String contextPath)
The context-path


getContextPath

public java.lang.String getContextPath()
The context-path


setRootDirectory

public void setRootDirectory(java.lang.String rootDirectory)
The root directory of the expanded web-app


getRootDirectory

public java.lang.String getRootDirectory()
The root directory of the expanded web-app


setArchivePath

public void setArchivePath(java.lang.String archivePath)
The path to the archive war file


getArchivePath

public java.lang.String getArchivePath()
The path to the archive war file


setDeployGenerator

public void setDeployGenerator(WebAppSingleDeployGenerator deployGenerator)

getDeployGenerator

public WebAppSingleDeployGenerator getDeployGenerator()

addServlet

public void addServlet(ServletEmbed servlet)
Adds a servlet definition


addServletMapping

public void addServletMapping(ServletMappingEmbed servletMapping)
Adds a servlet-mapping definition


addFilter

public void addFilter(FilterEmbed filter)
Adds a filter definition


addFilterMapping

public void addFilterMapping(FilterMappingEmbed filterMapping)
Adds a filter-mapping definition


addBean

public void addBean(BeanEmbed bean)
Adds a web bean.


setContextParam

public void setContextParam(java.lang.String name,
                            java.lang.String value)
Sets a context-param.


setDisableStart

public void setDisableStart(boolean isDisable)
For cases like JSP compilation, skip the startup step.


getWebApp

public WebApp getWebApp()

configure

protected void configure(WebApp webApp)
Configures the web-app (for internal use)