|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.airavata.server.BetterTomcat
public class BetterTomcat
This is an improvement to Embedded Tomcat. The objective is to provide a cleaner API for embedders.
| Nested Class Summary | |
|---|---|
static class |
BetterTomcat.Protocol
The valid protocol types |
| Constructor Summary | |
|---|---|
BetterTomcat()
|
|
BetterTomcat(int port)
|
|
| Method Summary | |
|---|---|
org.apache.catalina.connector.Connector |
addConnector(BetterTomcat.Protocol protocol,
String address,
int port)
Get a Tomcat Connector. |
org.apache.catalina.connector.Connector |
addConnector(int port)
|
org.apache.catalina.Context |
addContext(org.apache.catalina.Host host,
String contextPath,
String dir)
|
org.apache.catalina.Context |
addContext(String contextPath,
String baseDir)
Add a context - programmatic mode, no web.xml used. |
org.apache.catalina.Wrapper |
addServlet(String contextPath,
String servletName,
javax.servlet.Servlet servlet)
Add an existing Servlet to the context with no class.forName or initialisation. |
org.apache.catalina.Wrapper |
addServlet(String contextPath,
String servletName,
String servletClass)
Equivalent with |
org.apache.catalina.Context |
addWebapp(org.apache.catalina.Host host,
String contextPath,
String webappFilePath)
Add a webapp to a particular Host |
org.apache.catalina.Context |
addWebapp(String contextPath,
String webappFilePath)
Add a webapp using normal WEB-INF/web.xml if found. |
void |
enableNaming()
Enables JNDI naming which is disabled by default. |
org.apache.catalina.connector.Connector |
getConnector(BetterTomcat.Protocol protocol,
String address,
int port)
|
org.apache.catalina.Host |
getHost()
|
org.apache.catalina.startup.Tomcat |
getTomcat()
Returns the wrapped Tomcat instance. |
void |
setBaseDir(String baseDir)
|
void |
setClientAuth(org.apache.catalina.connector.Connector connector,
String clientAuth)
|
void |
setDefaultHost(String defaultHostName)
|
void |
setDefaultRealm(org.apache.catalina.Realm realm)
|
void |
setUnpackWars(boolean unpackWars)
Indicates whether WAR files should be unpacked or not |
void |
start()
Start the server. |
void |
stop()
Stop the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BetterTomcat()
public BetterTomcat(int port)
| Method Detail |
|---|
public void setUnpackWars(boolean unpackWars)
unpackWars - true - unpackWars
public void start()
throws org.apache.catalina.LifecycleException
org.apache.catalina.LifecycleException - If an irrecoverable error occurs while starting
public void stop()
throws org.apache.catalina.LifecycleException
org.apache.catalina.LifecycleException - If an irrecoverable error occurs while stoppingpublic org.apache.catalina.Host getHost()
public org.apache.catalina.Context addWebapp(String contextPath,
String webappFilePath)
throws BetterTomcatException
contextPath - The context of the webapp, e.g., /foowebappFilePath - The file path of the webapp. Can be the path to a WAR file or a
directory,
e.g.,
1. /home/azeez/bettertomcat/foo.war
2. /home/azeez/bettertomcat/foo
BetterTomcatException - If webapp deployment fails
public org.apache.catalina.Context addWebapp(org.apache.catalina.Host host,
String contextPath,
String webappFilePath)
host - The Host to which this webapp is added tocontextPath - The context of the webapp, e.g., /foowebappFilePath - The file path of the webapp. Can be the path to a WAR file or a
directory,
e.g.,
1. /home/azeez/bettertomcat/foo.war
2. /home/azeez/bettertomcat/foo
public org.apache.catalina.Context addContext(String contextPath,
String baseDir)
contextPath - The context of the webapp. "" for root context.baseDir - base dir for the context, for static files. Must exist,
relative to the server home
public org.apache.catalina.Context addContext(org.apache.catalina.Host host,
String contextPath,
String dir)
public org.apache.catalina.Wrapper addServlet(String contextPath,
String servletName,
String servletClass)
contextPath - Context to add Servlet toservletName - Servlet name (used in mappings)servletClass - The class to be used for the Servlet
public org.apache.catalina.Wrapper addServlet(String contextPath,
String servletName,
javax.servlet.Servlet servlet)
contextPath - Context to add Servlet toservletName - Servlet name (used in mappings)servlet - The Servlet to add
public void enableNaming()
Lifecycle in order for the
NamingContextListener to be used.
public org.apache.catalina.connector.Connector addConnector(int port)
public org.apache.catalina.connector.Connector addConnector(BetterTomcat.Protocol protocol,
String address,
int port)
protocol - The protocol of the connector.address - The IP address of the network interface to which this connector should bind
to. Specify this as null if the connector should bind to all network interfaces.port - The port on which this connector has to be run
public void setClientAuth(org.apache.catalina.connector.Connector connector,
String clientAuth)
public org.apache.catalina.connector.Connector getConnector(BetterTomcat.Protocol protocol,
String address,
int port)
public void setBaseDir(String baseDir)
public void setDefaultHost(String defaultHostName)
public void setDefaultRealm(org.apache.catalina.Realm realm)
public org.apache.catalina.startup.Tomcat getTomcat()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||