Package org.apache.catalina.startup
Class Catalina
java.lang.Object
org.apache.catalina.startup.Catalina
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.
- -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 Summary
Modifier and TypeClassDescriptionprotected class
Shutdown hook which will perform a clean shutdown of Catalina if needed. -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Use await.protected String
Pathname to the server configuration file.protected boolean
Prevent duplicate loads.protected ClassLoader
The shared extensions class loader for this server.protected Server
The server component we are starting or stopping.protected Thread
Shutdown hook.protected static final StringManager
The string manager for this package.protected boolean
Is naming enabled ?protected boolean
Use shutdown hook flag. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Process the specified command line arguments.void
await()
Await and shutdown.protected File
Return a File object representing our configuration file.protected Digester
Create and configure the Digester we will be using for startup.protected Digester
Create and configure the Digester we will be using for shutdown.boolean
protected void
initDirs()
Deprecated.unused.protected void
protected void
boolean
isAwait()
boolean
void
load()
Start a new server instance.void
void
setAwait
(boolean b) void
setConfigFile
(String file) void
setParentClassLoader
(ClassLoader parentClassLoader) Set the shared extensions class loader.protected void
Set the security package access/protection.void
void
setUseNaming
(boolean useNaming) Enables or disables naming support.void
setUseShutdownHook
(boolean useShutdownHook) void
start()
Start a new server instance.void
stop()
Stop an existing server instance.void
void
stopServer
(String[] arguments) protected void
usage()
Print usage information for this application.
-
Field Details
-
sm
The string manager for this package. -
await
protected boolean awaitUse await. -
configFile
Pathname to the server configuration file. -
parentClassLoader
The shared extensions class loader for this server. -
server
The server component we are starting or stopping. -
useShutdownHook
protected boolean useShutdownHookUse shutdown hook flag. -
shutdownHook
Shutdown hook. -
useNaming
protected boolean useNamingIs naming enabled ? -
loaded
protected boolean loadedPrevent duplicate loads.
-
-
Constructor Details
-
Catalina
public Catalina()
-
-
Method Details
-
setConfigFile
-
getConfigFile
-
setUseShutdownHook
public void setUseShutdownHook(boolean useShutdownHook) -
getUseShutdownHook
public boolean getUseShutdownHook() -
setParentClassLoader
Set the shared extensions class loader.- Parameters:
parentClassLoader
- The shared extensions class loader.
-
getParentClassLoader
-
setServer
-
getServer
-
isUseNaming
public boolean isUseNaming()- Returns:
true
if naming is enabled.
-
setUseNaming
public void setUseNaming(boolean useNaming) Enables or disables naming support.- Parameters:
useNaming
- The new use naming value
-
setAwait
public void setAwait(boolean b) -
isAwait
public boolean isAwait() -
arguments
Process the specified command line arguments.- Parameters:
args
- Command line arguments to process- Returns:
true
if we should continue processing
-
configFile
Return a File object representing our configuration file.- Returns:
- the main configuration file
-
createStartDigester
Create and configure the Digester we will be using for startup.- Returns:
- the main digester to parse server.xml
-
createStopDigester
Create and configure the Digester we will be using for shutdown.- Returns:
- the digester to process the stop operation
-
stopServer
public void stopServer() -
stopServer
-
load
public void load()Start a new server instance. -
load
-
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. -
initDirs
Deprecated.unused. Will be removed in Tomcat 10 onwards. -
initStreams
protected void initStreams() -
initNaming
protected void initNaming() -
setSecurityProtection
protected void setSecurityProtection()Set the security package access/protection.
-