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.Embedded
Tomcat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnector(TomcatEmbedded.Connector connector)
Adds a connector.void
addEngine(TomcatEmbedded.Engine e)
Adds a newTomcatEmbedded.Engine
.TomcatEmbedded.Connector
createConnector(InetAddress inetAddress, int port, boolean secure)
Creates a new connector.TomcatEmbedded.Context
createContext(String path, String docBase)
Creates an web application for deployment.TomcatEmbedded.Engine
createEngine()
Creates a new engine.TomcatEmbedded.Host
createHost(String name, File appBase)
Creates a new virtual host mapping.void
enableNaming()
Enable JNDI naming.TomcatEmbedded.Connector
getConnector()
Gets the connector.TomcatEmbedded.Engine
getEngine()
Gets the engine.TomcatEmbedded.Host
getHost()
Gets the host.void
setCatalinaBase(File dir)
Sets the Tomcat installation where catalina jars are loaded from.void
setCatalinaHome(File dir)
Sets the directory where Tomcat stores data file for the current running instance.void
setPort(int port)
Sets the HTTP port number.void
setRealm(TomcatEmbedded.MemoryRealm realm)
Associates a realm to Tomcat.void
start()
Starts the container.void
stop()
Stops the container.
-
-
-
Constructor Detail
-
Embedded
public Embedded()
Creates a newTomcatEmbedded.Embedded
Tomcat.
-
-
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.
-
-