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 classCatalina.CatalinaShutdownHookShutdown hook which will perform a clean shutdown of Catalina if needed.
-
Field Summary
Fields Modifier and Type Field Description protected StringconfigFilePathname to the server configuration file.protected ClassLoaderparentClassLoaderThe shared extensions class loader for this server.protected ServerserverThe server component we are starting or stoppingprotected ThreadshutdownHookShutdown hook.protected booleanstartingAre we starting a new server?protected booleanstoppingAre 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 booleanarguments(String[] args)Process the specified command line arguments, and returntrueif we should continue processing; otherwise returnfalse.voidawait()Await and shutdown.protected FileconfigFile()Return a File object representing our configuration file.voidcreate()protected DigestercreateStartDigester()Create and configure the Digester we will be using for startup.protected DigestercreateStopDigester()Create and configure the Digester we will be using for shutdown.voiddestroy()StringgetConfigFile()voidload()Start a new server instance.voidload(String[] args)static voidmain(String[] args)The application main program.voidprocess(String[] args)The instance main program.voidsetCatalinaBase()Deprecated.Use initDirs()voidsetCatalinaHome()Deprecated.Use initDirs()voidsetConfig(String file)voidsetConfigFile(String file)voidsetParentClassLoader(ClassLoader parentClassLoader)Set the shared extensions class loader.voidsetServer(Server server)Set the server instance we are configuring.voidstart()Start a new server instance.voidstop()Stop an existing server instance.voidstopServer()protected voidusage()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:
setServerin interfaceService- Overrides:
setServerin 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 returntrueif 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.baseSystem property to the current working directory if it has not been set.
-
setCatalinaHome
public void setCatalinaHome()
Deprecated.Use initDirs()Set thecatalina.homeSystem 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.
-
-