Package org.apache.catalina.startup
Class Catalina
- java.lang.Object
- 
- org.apache.catalina.startup.Catalina
 
- 
 public class Catalina extends java.lang.ObjectStartup/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.
- -nonaming - Disable naming support.
- configtest - Try to test the config
- start - Start an instance of Catalina.
- stop - Stop the currently running instance of Catalina.
 - Author:
- Craig R. McClanahan, Remy Maucherat
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classCatalina.CatalinaShutdownHookShutdown hook which will perform a clean shutdown of Catalina if needed.
 - 
Field SummaryFields Modifier and Type Field Description protected booleanawaitUse await.protected java.lang.StringconfigFilePathname to the server configuration file.protected booleanloadedPrevent duplicate loads.protected java.lang.ClassLoaderparentClassLoaderThe shared extensions class loader for this server.protected ServerserverThe server component we are starting or stopping.protected java.lang.ThreadshutdownHookShutdown hook.protected static StringManagersmThe string manager for this package.protected booleanuseNamingIs naming enabled ?protected booleanuseShutdownHookUse shutdown hook flag.
 - 
Constructor SummaryConstructors Constructor Description Catalina()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleanarguments(java.lang.String[] args)Process the specified command line arguments.voidawait()Await and shutdown.protected java.io.FileconfigFile()Return a File object representing our configuration file.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.java.lang.StringgetConfigFile()java.lang.ClassLoadergetParentClassLoader()ServergetServer()booleangetUseShutdownHook()protected voidinitDirs()Deprecated.unused.protected voidinitNaming()protected voidinitStreams()booleanisAwait()booleanisUseNaming()voidload()Start a new server instance.voidload(java.lang.String[] args)voidsetAwait(boolean b)voidsetConfigFile(java.lang.String file)voidsetParentClassLoader(java.lang.ClassLoader parentClassLoader)Set the shared extensions class loader.protected voidsetSecurityProtection()Set the security package access/protection.voidsetServer(Server server)voidsetUseNaming(boolean useNaming)Enables or disables naming support.voidsetUseShutdownHook(boolean useShutdownHook)voidstart()Start a new server instance.voidstop()Stop an existing server instance.voidstopServer()voidstopServer(java.lang.String[] arguments)protected voidusage()Print usage information for this application.
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm The string manager for this package.
 - 
awaitprotected boolean await Use await.
 - 
configFileprotected java.lang.String configFile Pathname to the server configuration file.
 - 
parentClassLoaderprotected java.lang.ClassLoader parentClassLoader The shared extensions class loader for this server.
 - 
serverprotected Server server The server component we are starting or stopping.
 - 
useShutdownHookprotected boolean useShutdownHook Use shutdown hook flag.
 - 
shutdownHookprotected java.lang.Thread shutdownHook Shutdown hook.
 - 
useNamingprotected boolean useNaming Is naming enabled ?
 - 
loadedprotected boolean loaded Prevent duplicate loads.
 
- 
 - 
Method Detail- 
setConfigFilepublic void setConfigFile(java.lang.String file) 
 - 
getConfigFilepublic java.lang.String getConfigFile() 
 - 
setUseShutdownHookpublic void setUseShutdownHook(boolean useShutdownHook) 
 - 
getUseShutdownHookpublic boolean getUseShutdownHook() 
 - 
setParentClassLoaderpublic void setParentClassLoader(java.lang.ClassLoader parentClassLoader) Set the shared extensions class loader.- Parameters:
- parentClassLoader- The shared extensions class loader.
 
 - 
getParentClassLoaderpublic java.lang.ClassLoader getParentClassLoader() 
 - 
setServerpublic void setServer(Server server) 
 - 
getServerpublic Server getServer() 
 - 
isUseNamingpublic boolean isUseNaming() - Returns:
- trueif naming is enabled.
 
 - 
setUseNamingpublic void setUseNaming(boolean useNaming) Enables or disables naming support.- Parameters:
- useNaming- The new use naming value
 
 - 
setAwaitpublic void setAwait(boolean b) 
 - 
isAwaitpublic boolean isAwait() 
 - 
argumentsprotected boolean arguments(java.lang.String[] args) Process the specified command line arguments.- Parameters:
- args- Command line arguments to process
- Returns:
- trueif we should continue processing
 
 - 
configFileprotected java.io.File configFile() Return a File object representing our configuration file.- Returns:
- the main configuration file
 
 - 
createStartDigesterprotected Digester createStartDigester() Create and configure the Digester we will be using for startup.- Returns:
- the main digester to parse server.xml
 
 - 
createStopDigesterprotected Digester createStopDigester() Create and configure the Digester we will be using for shutdown.- Returns:
- the digester to process the stop operation
 
 - 
stopServerpublic void stopServer() 
 - 
stopServerpublic void stopServer(java.lang.String[] arguments) 
 - 
loadpublic void load() Start a new server instance.
 - 
loadpublic void load(java.lang.String[] args) 
 - 
startpublic void start() Start a new server instance.
 - 
stoppublic void stop() Stop an existing server instance.
 - 
awaitpublic void await() Await and shutdown.
 - 
usageprotected void usage() Print usage information for this application.
 - 
initDirs@Deprecated protected void initDirs() Deprecated.unused. Will be removed in Tomcat 10 onwards.
 - 
initStreamsprotected void initStreams() 
 - 
initNamingprotected void initNaming() 
 - 
setSecurityProtectionprotected void setSecurityProtection() Set the security package access/protection.
 
- 
 
-