org.kuali.rice.test.launch
Class JettyLauncher
java.lang.Object
org.kuali.rice.test.launch.JettyLauncher
public class JettyLauncher
- extends Object
LOG
private static final org.apache.log4j.Logger LOG
JETTYSERVER_TESTMODE_ATTRIB
public static final String JETTYSERVER_TESTMODE_ATTRIB
- The name of an attribute we set in the ServletContext to indicate to the webapp
that it is running within unit tests, in case it needs to alter its configuration
or behavior.
- See Also:
- Constant Field Values
port
private int port
contextName
private String contextName
relativeWebappRoots
private List<String> relativeWebappRoots
servletClass
private Class<? extends javax.servlet.Servlet> servletClass
server
private org.eclipse.jetty.server.Server server
context
private org.eclipse.jetty.servlet.ServletContextHandler context
failOnContextFailure
private boolean failOnContextFailure
testMode
private boolean testMode
- Whether we are in test mode
JettyLauncher
public JettyLauncher()
JettyLauncher
public JettyLauncher(int port)
JettyLauncher
public JettyLauncher(int port,
String contextName)
JettyLauncher
public JettyLauncher(int port,
String contextName,
String relativeWebappRoot)
JettyLauncher
public JettyLauncher(int port,
String contextName,
Class<? extends javax.servlet.Servlet> servletClass)
JettyLauncher
public JettyLauncher(int port,
String contextName,
String relativeWebappRoots,
Class<? extends javax.servlet.Servlet> servletClass)
setTestMode
public void setTestMode(boolean t)
isTestMode
public boolean isTestMode()
getServer
public org.eclipse.jetty.server.Server getServer()
getContext
public org.eclipse.jetty.servlet.ServletContextHandler getContext()
start
public void start()
throws Exception
- Throws:
Exception
stop
public void stop()
throws Exception
- Throws:
Exception
isStarted
public boolean isStarted()
createServer
protected org.eclipse.jetty.server.Server createServer()
setBaseDirSystemProperty
protected void setBaseDirSystemProperty()
useWebAppContext
private boolean useWebAppContext()
contextStartupFailed
protected boolean contextStartupFailed()
throws Exception
- Throws:
Exception
getContextName
public String getContextName()
setContextName
public void setContextName(String contextName)
getPort
public int getPort()
setPort
public void setPort(int port)
isFailOnContextFailure
public boolean isFailOnContextFailure()
setFailOnContextFailure
public void setFailOnContextFailure(boolean failOnContextFailure)
toString
public String toString()
- Overrides:
toString
in class Object
main
public static void main(String[] args)
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.