org.apache.catalina.startup

Class Catalina

public class Catalina extends Embedded

Startup/Shutdown shell program for Catalina. The following command line options are recognized:
Nested Class Summary
protected classCatalina.CatalinaShutdownHook
Shutdown hook which will perform a clean shutdown of Catalina if needed.
Field Summary
protected StringconfigFile
Pathname to the server configuration file.
protected ClassLoaderparentClassLoader
The shared extensions class loader for this server.
protected Serverserver
The server component we are starting or stopping
protected ThreadshutdownHook
Shutdown hook.
protected booleanstarting
Are we starting a new server?
protected booleanstopping
Are we stopping an existing server?
protected booleanuseShutdownHook
Use shutdown hook flag.
Method Summary
protected booleanarguments(String[] args)
Process the specified command line arguments, and return true if we should continue processing; otherwise return false.
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()
booleangetUseShutdownHook()
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()
Set the catalina.base System property to the current working directory if it has not been set.
voidsetCatalinaHome()
Set the catalina.home System property to the current working directory if it has not been set.
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.
voidsetUseShutdownHook(boolean useShutdownHook)
voidstart()
Start a new server instance.
voidstop()
Stop an existing server instance.
voidstopServer()
voidstopServer(String[] arguments)
protected voidusage()
Print usage information for this application.

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

shutdownHook

protected Thread shutdownHook
Shutdown hook.

starting

protected boolean starting
Are we starting a new server?

stopping

protected boolean stopping
Are we stopping an existing server?

useShutdownHook

protected boolean useShutdownHook
Use shutdown hook flag.

Method Detail

arguments

protected boolean arguments(String[] args)
Process the specified command line arguments, and return true if we should continue processing; otherwise return false.

Parameters: args Command line arguments to process

await

public void await()
Await and shutdown.

configFile

protected File configFile()
Return a File object representing our configuration file.

create

public void create()

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.

destroy

public void destroy()

getConfigFile

public String getConfigFile()

getUseShutdownHook

public boolean getUseShutdownHook()

load

public void load()
Start a new server instance.

load

public void load(String[] args)

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

setCatalinaBase

public void setCatalinaBase()

Deprecated: Use initDirs()

Set the catalina.base System property to the current working directory if it has not been set.

setCatalinaHome

public void setCatalinaHome()

Deprecated: Use initDirs()

Set the catalina.home System property to the current working directory if it has not been set.

setConfig

public void setConfig(String file)

setConfigFile

public void setConfigFile(String file)

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.

Parameters: server The new server

setUseShutdownHook

public void setUseShutdownHook(boolean useShutdownHook)

start

public void start()
Start a new server instance.

stop

public void stop()
Stop an existing server instance.

stopServer

public void stopServer()

stopServer

public void stopServer(String[] arguments)

usage

protected void usage()
Print usage information for this application.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.