org.kuali.rice.test.launch
Class JettyLauncher

java.lang.Object
  extended by org.kuali.rice.test.launch.JettyLauncher

public class JettyLauncher
extends Object


Field Summary
private  org.eclipse.jetty.servlet.ServletContextHandler context
           
private  String contextName
           
private  boolean failOnContextFailure
           
static 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.
private static org.apache.log4j.Logger LOG
           
private  int port
           
private  List<String> relativeWebappRoots
           
private  org.eclipse.jetty.server.Server server
           
private  Class<? extends javax.servlet.Servlet> servletClass
           
private  boolean testMode
          Whether we are in test mode
 
Constructor Summary
JettyLauncher()
           
JettyLauncher(int port)
           
JettyLauncher(int port, String contextName)
           
JettyLauncher(int port, String contextName, Class<? extends javax.servlet.Servlet> servletClass)
           
JettyLauncher(int port, String contextName, String relativeWebappRoot)
           
JettyLauncher(int port, String contextName, String relativeWebappRoots, Class<? extends javax.servlet.Servlet> servletClass)
           
 
Method Summary
protected  boolean contextStartupFailed()
           
protected  org.eclipse.jetty.server.Server createServer()
           
 org.eclipse.jetty.servlet.ServletContextHandler getContext()
           
 String getContextName()
           
 int getPort()
           
 org.eclipse.jetty.server.Server getServer()
           
 boolean isFailOnContextFailure()
           
 boolean isStarted()
           
 boolean isTestMode()
           
static void main(String[] args)
           
protected  void setBaseDirSystemProperty()
           
 void setContextName(String contextName)
           
 void setFailOnContextFailure(boolean failOnContextFailure)
           
 void setPort(int port)
           
 void setTestMode(boolean t)
           
 void start()
           
 void stop()
           
 String toString()
           
private  boolean useWebAppContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

Constructor Detail

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)
Method Detail

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.