Class DevAppServerFactory
java.lang.Object
com.google.appengine.tools.development.DevAppServerFactory
Creates new
DevAppServers which can be used to launch web applications.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Collection<URL> classpath) Creates a newDevAppServerwith a custom classpath for the web app.createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Collection<URL> classpath, boolean noJavaAgent) Creates a newDevAppServerwith a custom classpath for the web app.createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Map<String, Object> containerConfigProperties) Creates a newDevAppServerready to start serving.createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Map<String, Object> containerConfigProperties, boolean noJavaAgent) Creates a newDevAppServerwith a custom classpath for the web app.createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Map<String, Object> containerConfigProperties, boolean noJavaAgent, String applicationId) Creates a newDevAppServerwith a custom classpath and application ID for the web app.createDevAppServer(File appDir, File externalResourceDir, String address, int port) Creates a newDevAppServerready to start serving.createDevAppServer(File appDir, File externalResourceDir, String address, int port, boolean noJavaAgent) Creates a newDevAppServerready to start serving.createDevAppServer(File appDir, String address, int port) Creates a newDevAppServerready to start serving.
-
Constructor Details
-
DevAppServerFactory
public DevAppServerFactory()
-
-
Method Details
-
createDevAppServer
Creates a newDevAppServerready to start serving.- Parameters:
appDir- The top-level directory of the web application to be runaddress- Address to bind toport- Port to bind to- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File externalResourceDir, String address, int port) Creates a newDevAppServerready to start serving.- Parameters:
appDir- The top-level directory of the web application to be runexternalResourceDir- If notnull, a resource directory external to the appDir. This parameter is now ignored.address- Address to bind toport- Port to bind to- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File externalResourceDir, String address, int port, boolean noJavaAgent) Creates a newDevAppServerready to start serving.- Parameters:
appDir- The top-level directory of the web application to be runexternalResourceDir- If notnull, a resource directory external to the appDir. This parameter is now ignored.address- Address to bind toport- Port to bind tonoJavaAgent- whether to disable detection of the Java agent or not- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Collection<URL> classpath) Creates a newDevAppServerwith a custom classpath for the web app.- Parameters:
appDir- The top-level directory of the web application to be runwebXmlLocation- The location of a file whose format complies with http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. Ifnull, defaults to/WEB-INF/web.xml appEngineWebXmlLocation- The name of the app engine config file. Ifnull, defaults to/WEB-INF/appengine-web.xml. address- Address to bind toport- Port to bind touseCustomStreamHandler- Iftrue, installStreamHandlerFactory. This is "normal" behavior for the dev app server but tests may want to disable this since there are some compatibility issues with our custom handler and Selenium.installSecurityManager- Whether or not to install the dev appserver security manager. It is strongly recommended you passtrueunless there is something in your test environment that prevents you from installing a security manager.classpath- The classpath of the test and all its dependencies (possibly the entire app).- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Collection<URL> classpath, boolean noJavaAgent) Creates a newDevAppServerwith a custom classpath for the web app.- Parameters:
appDir- The top-level directory of the web application to be runwebXmlLocation- The location of a file whose format complies with http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. Ifnull, defaults to/WEB-INF/web.xml appEngineWebXmlLocation- The name of the app engine config file. Ifnull, defaults to/WEB-INF/appengine-web.xml. address- Address to bind toport- Port to bind touseCustomStreamHandler- Iftrue, installStreamHandlerFactory. This is "normal" behavior for the dev app server but tests may want to disable this since there are some compatibility issues with our custom handler and Selenium.installSecurityManager- Whether or not to install the dev appserver security manager. It is strongly recommended you passtrueunless there is something in your test environment that prevents you from installing a security manager.classpath- The classpath of the test and all its dependencies (possibly the entire app).noJavaAgent- whether to disable detection of the Java agent or not- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Map<String, Object> containerConfigProperties) Creates a newDevAppServerready to start serving.- Parameters:
appDir- The top-level directory of the web application to be runwebXmlLocation- The location of a file whose format complies with http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. Ifnull, defaults to/WEB-INF/web.xml appEngineWebXmlLocation- The name of the app engine config file. Ifnull, defaults to/WEB-INF/appengine-web.xml. address- Address to bind toport- Port to bind touseCustomStreamHandler- Iftrue, installStreamHandlerFactory. This is "normal" behavior for the dev app server but tests may want to disable this since there are some compatibility issues with our custom handler and Selenium.installSecurityManager- Whether or not to install the dev appserver security manager. It is strongly recommended you passtrueunless there is something in your test environment that prevents you from installing a security manager.containerConfigProperties-Mapthat contains settings that will allow to inject a classpath and to not require a WEB-INF directory. (Only needed for testing).- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Map<String, Object> containerConfigProperties, boolean noJavaAgent) Creates a newDevAppServerwith a custom classpath for the web app.- Parameters:
appDir- The top-level directory of the web application to be runwebXmlLocation- The location of a file whose format complies with http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. Ifnull, defaults to {appDir}/WEB-INF/web.xmlappEngineWebXmlLocation- The name of the app engine config file. Ifnull, defaults to {appDir}/WEB-INF/appengine-web.xml.address- Address to bind toport- Port to bind touseCustomStreamHandler- Iftrue, installStreamHandlerFactory. This is "normal" behavior for the dev app server but tests may want to disable this since there are some compatibility issues with our custom handler and Selenium.installSecurityManager- Whether or not to install the dev appserver security manager. For the java8 runtime, you do not need a security manager.containerConfigProperties- Extra container configurations.noJavaAgent- whether to disable detection of the Java agent or not.- Returns:
- a
DevAppServer
-
createDevAppServer
public DevAppServer createDevAppServer(File appDir, File webXmlLocation, File appEngineWebXmlLocation, String address, int port, boolean useCustomStreamHandler, boolean installSecurityManager, Map<String, Object> containerConfigProperties, boolean noJavaAgent, String applicationId) Creates a newDevAppServerwith a custom classpath and application ID for the web app.- Parameters:
appDir- The top-level directory of the web application to be runwebXmlLocation- The location of a file whose format complies with http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. Ifnull, defaults to {appDir}/WEB-INF/web.xmlappEngineWebXmlLocation- The name of the app engine config file. Ifnull, defaults to {appDir}/WEB-INF/appengine-web.xml.address- Address to bind toport- Port to bind touseCustomStreamHandler- Iftrue, installStreamHandlerFactory. This is "normal" behavior for the dev app server but tests may want to disable this since there are some compatibility issues with our custom handler and Selenium.installSecurityManager- Whether or not to install the dev appserver security manager. For the java8 runtime, you do not need a security manager.containerConfigProperties- Extra container configurations.noJavaAgent- whether to disable detection of the Java agent or not.applicationId- Custom application ID. Ifnull, defaults to use the primary module's application ID.- Returns:
- a
DevAppServer
-