Class HttpdSharedTomcatManager<T extends TomcatCommon>
java.lang.Object
com.aoindustries.aoserv.daemon.httpd.tomcat.HttpdSharedTomcatManager<T>
- All Implemented Interfaces:
StopStartable
- Direct Known Subclasses:
VersionedSharedTomcatManager
public abstract class HttpdSharedTomcatManager<T extends TomcatCommon>
extends Object
implements StopStartable
Manages SharedTomcat configurations.
- Author:
- AO Industries, Inc.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doRebuild
(List<File> deleteFileList, Set<SharedTomcat> sharedTomcatsNeedingRestarted, Set<PackageManager.PackageName> usedPackages) Responsible for control of all things in/wwwgroup
.Gets the PID file.protected Set
<PackageManager.PackageName> Gets any packages that must be installed for this site.boolean
Determines if the persistent processes for this site should be running.start()
Starts all processes for this website if it is not running.stop()
Stops all processes for this website if it is running.static void
stopStartAndRestart
(Set<SharedTomcat> sharedTomcatsNeedingRestarted) Stops any daemons that should not be running.protected abstract boolean
upgradeSharedTomcatDirectory
(String optSlash, PosixFile siteDirectory) Upgrades the site directory contents for an auto-upgrade.
-
Field Details
-
Method Details
-
doRebuild
public static void doRebuild(List<File> deleteFileList, Set<SharedTomcat> sharedTomcatsNeedingRestarted, Set<PackageManager.PackageName> usedPackages) throws IOException, SQLException Responsible for control of all things in/wwwgroup
.Only called by the already synchronized
HttpdManager.doRebuild()
method.- Throws:
IOException
SQLException
-
stopStartAndRestart
public static void stopStartAndRestart(Set<SharedTomcat> sharedTomcatsNeedingRestarted) throws IOException, SQLException Stops any daemons that should not be running. Restarts any sites that need restarted. Starts any daemons that should be running.Makes calls with a one-minute time-out. Logs errors on calls as warnings, continues to next site.
Only called by the already synchronized
HttpdManager.doRebuild()
method.- Throws:
IOException
SQLException
-
getRequiredPackages
Gets any packages that must be installed for this site.By default, uses the package required for Tomcat.
- Throws:
IOException
SQLException
-
getPidFile
Gets the PID file.- Throws:
IOException
SQLException
-
isStartable
Description copied from interface:StopStartable
Determines if the persistent processes for this site should be running.- Specified by:
isStartable
in interfaceStopStartable
- Throws:
IOException
SQLException
-
getStartStopScriptPath
- Throws:
IOException
SQLException
-
getStartStopScriptWorkingDirectory
- Throws:
IOException
SQLException
-
stop
Description copied from interface:StopStartable
Stops all processes for this website if it is running.- Specified by:
stop
in interfaceStopStartable
- Returns:
true
if actually stopped orfalse
if was already stopped ornull
when unknown- Throws:
IOException
SQLException
-
start
Description copied from interface:StopStartable
Starts all processes for this website if it is not running.- Specified by:
start
in interfaceStopStartable
- Returns:
true
if actually started orfalse
if was already started ornull
when unknown- Throws:
IOException
SQLException
-