Class TomcatEmbedded.Embedded
- java.lang.Object
-
- org.codehaus.cargo.container.tomcat.internal.TomcatEmbedded.Embedded
-
- Enclosing class:
- TomcatEmbedded
public final class TomcatEmbedded.Embedded extends Object
Copy oforg.apache.catalina.startup.Embedded
-
-
Constructor Summary
Constructors Constructor Description Embedded()Creates a newTomcatEmbedded.EmbeddedTomcat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnector(TomcatEmbedded.Connector connector)Adds a connector.voidaddEngine(TomcatEmbedded.Engine e)Adds a newTomcatEmbedded.Engine.TomcatEmbedded.ConnectorcreateConnector(InetAddress inetAddress, int port, boolean secure)Creates a new connector.TomcatEmbedded.ContextcreateContext(String path, String docBase)Creates an web application for deployment.TomcatEmbedded.EnginecreateEngine()Creates a new engine.TomcatEmbedded.HostcreateHost(String name, File appBase)Creates a new virtual host mapping.voidenableNaming()Enable JNDI naming.TomcatEmbedded.ConnectorgetConnector()Gets the connector.TomcatEmbedded.EnginegetEngine()Gets the engine.TomcatEmbedded.HostgetHost()Gets the host.voidsetCatalinaBase(File dir)Sets the Tomcat installation where catalina jars are loaded from.voidsetCatalinaHome(File dir)Sets the directory where Tomcat stores data file for the current running instance.voidsetPort(int port)Sets the HTTP port number.voidsetRealm(TomcatEmbedded.MemoryRealm realm)Associates a realm to Tomcat.voidstart()Starts the container.voidstop()Stops the container.
-
-
-
Constructor Detail
-
Embedded
public Embedded()
Creates a newTomcatEmbedded.EmbeddedTomcat.
-
-
Method Detail
-
createEngine
public TomcatEmbedded.Engine createEngine()
Creates a new engine.- Returns:
- non-null
-
createHost
public TomcatEmbedded.Host createHost(String name, File appBase)
Creates a new virtual host mapping.- Parameters:
name- Host name.appBase- The "webapp" directory.- Returns:
- Always non-null.
-
start
public void start()
Starts the container.
-
stop
public void stop()
Stops the container.
-
addEngine
public void addEngine(TomcatEmbedded.Engine e)
Adds a newTomcatEmbedded.Engine.- Parameters:
e- must be non-null.
-
createConnector
public TomcatEmbedded.Connector createConnector(InetAddress inetAddress, int port, boolean secure)
Creates a new connector.- Parameters:
inetAddress- non-null if you want to bind to specific interfacesport- TCP port number.secure- Not sure what this really is.- Returns:
- Always non-null.
-
addConnector
public void addConnector(TomcatEmbedded.Connector connector)
Adds a connector.- Parameters:
connector- must be non-null.
-
createContext
public TomcatEmbedded.Context createContext(String path, String docBase)
Creates an web application for deployment.- Parameters:
path- the context URLdocBase- the exploded war file image.- Returns:
- Always non-null
-
setRealm
public void setRealm(TomcatEmbedded.MemoryRealm realm)
Associates a realm to Tomcat.- Parameters:
realm- realm object.
-
setCatalinaBase
public void setCatalinaBase(File dir)
Sets the Tomcat installation where catalina jars are loaded from.- Parameters:
dir- the home directory.
-
setCatalinaHome
public void setCatalinaHome(File dir)
Sets the directory where Tomcat stores data file for the current running instance.- Parameters:
dir- the home directory.
-
setPort
public void setPort(int port)
Sets the HTTP port number.- Parameters:
port- Port.
-
enableNaming
public void enableNaming()
Enable JNDI naming.
-
getConnector
public TomcatEmbedded.Connector getConnector()
Gets the connector.- Returns:
- Connector.
-
getEngine
public TomcatEmbedded.Engine getEngine()
Gets the engine.- Returns:
- Engine.
-
getHost
public TomcatEmbedded.Host getHost()
Gets the host.- Returns:
- Host.
-
-