Package org.apache.catalina.startup
Class Catalina
- java.lang.Object
-
- org.apache.catalina.core.StandardService
-
- org.apache.catalina.startup.Embedded
-
- org.apache.catalina.startup.Catalina
-
public class Catalina extends Embedded
Startup/Shutdown shell program for Catalina. The following command line options are recognized:- -config {pathname} - Set the pathname of the configuration file to be processed. If a relative path is specified, it will be interpreted as relative to the directory pathname specified by the "catalina.base" system property. [conf/server.xml]
- -help - Display usage information.
- -stop - Stop the currently running instance of Catalina.
- Version:
- $Revision: 1.5 $ $Date: 2006/11/10 18:12:35 $
- Author:
- Craig R. McClanahan, Remy Maucherat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Catalina.CatalinaShutdownHook
Shutdown hook which will perform a clean shutdown of Catalina if needed.
-
Field Summary
Fields Modifier and Type Field Description protected String
configFile
Pathname to the server configuration file.protected ClassLoader
parentClassLoader
The shared extensions class loader for this server.protected Server
server
The server component we are starting or stoppingprotected Thread
shutdownHook
Shutdown hook.protected boolean
starting
Are we starting a new server?protected boolean
stopping
Are we stopping an existing server?-
Fields inherited from class org.apache.catalina.startup.Embedded
authenticators, await, embeddedDirectoryListing, engines, info, lifecycle, log, logger, rb, realm, socketFactory, started, useNaming
-
Fields inherited from class org.apache.catalina.core.StandardService
connectors, connectorsMonitor, container, debug, domain, initialized, oname, support
-
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
-
-
Constructor Summary
Constructors Constructor Description Catalina()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
arguments(String[] args)
Process the specified command line arguments, and returntrue
if we should continue processing; otherwise returnfalse
.void
await()
Await and shutdown.protected File
configFile()
Return a File object representing our configuration file.void
create()
protected Digester
createStartDigester()
Create and configure the Digester we will be using for startup.protected Digester
createStopDigester()
Create and configure the Digester we will be using for shutdown.void
destroy()
String
getConfigFile()
void
load()
Start a new server instance.void
load(String[] args)
static void
main(String[] args)
The application main program.void
process(String[] args)
The instance main program.void
setCatalinaBase()
Deprecated.Use initDirs()void
setCatalinaHome()
Deprecated.Use initDirs()void
setConfig(String file)
void
setConfigFile(String file)
void
setParentClassLoader(ClassLoader parentClassLoader)
Set the shared extensions class loader.void
setServer(Server server)
Set the server instance we are configuring.void
start()
Start a new server instance.void
stop()
Stop an existing server instance.void
stopServer()
protected void
usage()
Print usage information for this application.-
Methods inherited from class org.apache.catalina.startup.Embedded
addAuthenticator, addConnector, addEngine, addLifecycleListener, createConnector, createConnector, createConnector, createConnector, createContext, createEngine, createHost, createLoader, findLifecycleListeners, getCatalinaBase, getCatalinaHome, getEngines, getInfo, getLogger, getRealm, getSocketFactory, initDirs, initNaming, isAwait, isDirectoryListing, isUseNaming, removeContext, removeEngine, removeHost, removeLifecycleListener, setAwait, setCatalinaBase, setCatalinaHome, setDirectoryListing, setLogger, setRealm, setSecurityProtection, setSocketFactory, setUseNaming
-
Methods inherited from class org.apache.catalina.core.StandardService
addPropertyChangeListener, findConnector, findConnectors, getBroadcaster, getConnectorNames, getContainer, getContainerName, getDebug, getDomain, getName, getObjectName, getServer, init, initialize, removeConnector, removePropertyChangeListener, setBroadcaster, setContainer, setDebug, setName, toString
-
-
-
-
Field Detail
-
configFile
protected String configFile
Pathname to the server configuration file.
-
parentClassLoader
protected ClassLoader parentClassLoader
The shared extensions class loader for this server.
-
server
protected Server server
The server component we are starting or stopping
-
starting
protected boolean starting
Are we starting a new server?
-
stopping
protected boolean stopping
Are we stopping an existing server?
-
shutdownHook
protected Thread shutdownHook
Shutdown hook.
-
-
Method Detail
-
setConfig
public void setConfig(String file)
-
setConfigFile
public void setConfigFile(String file)
-
getConfigFile
public String getConfigFile()
-
setParentClassLoader
public void setParentClassLoader(ClassLoader parentClassLoader)
Set the shared extensions class loader.- Parameters:
parentClassLoader
- The shared extensions class loader.
-
setServer
public void setServer(Server server)
Set the server instance we are configuring.- Specified by:
setServer
in interfaceService
- Overrides:
setServer
in classStandardService
- Parameters:
server
- The new server
-
main
public static void main(String[] args)
The application main program.- Parameters:
args
- Command line arguments
-
process
public void process(String[] args)
The instance main program.- Parameters:
args
- Command line arguments
-
arguments
protected boolean arguments(String[] args)
Process the specified command line arguments, and returntrue
if we should continue processing; otherwise returnfalse
.- Parameters:
args
- Command line arguments to process
-
configFile
protected File configFile()
Return a File object representing our configuration file.
-
createStartDigester
protected Digester createStartDigester()
Create and configure the Digester we will be using for startup.
-
createStopDigester
protected Digester createStopDigester()
Create and configure the Digester we will be using for shutdown.
-
stopServer
public void stopServer()
-
setCatalinaBase
public void setCatalinaBase()
Deprecated.Use initDirs()Set thecatalina.base
System property to the current working directory if it has not been set.
-
setCatalinaHome
public void setCatalinaHome()
Deprecated.Use initDirs()Set thecatalina.home
System property to the current working directory if it has not been set.
-
load
public void load()
Start a new server instance.
-
load
public void load(String[] args)
-
create
public void create()
-
start
public void start()
Start a new server instance.
-
stop
public void stop()
Stop an existing server instance.
-
await
public void await()
Await and shutdown.
-
usage
protected void usage()
Print usage information for this application.
-
-