Class SharedTomcat
java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,SharedTomcat>
com.aoindustries.aoserv.client.CachedObject<Integer,SharedTomcat>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<SharedTomcat>
com.aoindustries.aoserv.client.web.tomcat.SharedTomcat
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,Disablable
,Removable
,SingleTableObject<Integer,
SharedTomcat>
public final class SharedTomcat
extends CachedObjectIntegerKey<SharedTomcat>
implements Disablable, Removable
An
HttpdSharedTomcat
stores configuration information
about the Jakarta Tomcat JVM under which run one or more
HttpdTomcatSharedSite
s.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default setting of maxParameterCount on the <Connector /> in server.xml.static final int
The default setting of maxPostSize on the <Connector /> in server.xml.static final String
static final int
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
Fields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
disable
(DisableLog dl) void
enable()
boolean
Gets theautoDeploy
setting for this Tomcat.Lists the reasons an object may not be removed.protected Object
getColumnImpl
(int i) int
int
int
Gets themaxParameterCount
or-1
if not limited.int
Gets themaxPostSize
or-1
if not limited.getName()
boolean
Gets thetomcatAuthentication
setting for this Tomcat.boolean
Gets theundeployOldVersions
setting for this Tomcat.boolean
Gets theunpackWars
setting for this Tomcat.void
Initializes this object from the raw database contents.boolean
Checks if this object is disabled.boolean
isManual()
static boolean
Checks the format of the name of the shared Tomcat, as used in the/wwwgroup
directory.void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) readImpl method comment.void
remove()
Removes this object, and all dependant objects, from the system.void
setAutoDeploy
(boolean autoDeploy) void
setHttpdTomcatVersion
(Version version) void
setIsManual
(boolean isManual) void
setMaxParameterCount
(int maxParameterCount) void
setMaxPostSize
(int maxPostSize) void
setTomcatAuthentication
(boolean tomcatAuthentication) void
setUndeployOldVersions
(boolean undeployOldVersions) void
setUnpackWars
(boolean unpackWars) AoservObject.toString()
implementation that is allowed to throw exceptions.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
Methods inherited from class com.aoindustries.aoserv.client.AoservObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxId, getLinuxUserName, getMacAddress, getMysqlDatabaseName, getMysqlServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
Field Details
-
DEFAULT_MAX_PARAMETER_COUNT
public static final int DEFAULT_MAX_PARAMETER_COUNTThe default setting of maxParameterCount on the <Connector /> in server.xml. This matches the default of1000
since Tomcat 8.5.88, 9.0.74, 10.1.8. Previously, the default was10000
.- See Also:
-
DEFAULT_MAX_POST_SIZE
public static final int DEFAULT_MAX_POST_SIZEThe default setting of maxPostSize on the <Connector /> in server.xml. This raises the value from the Tomcat default of 2 MiB to a more real-world value, such as allowing uploads of pictures from modern digital cameras.- See Also:
-
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH- See Also:
-
DEFAULT_TOMCAT_VERSION_PREFIX
- See Also:
-
-
Constructor Details
-
SharedTomcat
Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
canDisable
public boolean canDisable()- Specified by:
canDisable
in interfaceDisablable
-
canEnable
- Specified by:
canEnable
in interfaceDisablable
- Throws:
SQLException
IOException
-
getCannotRemoveReasons
public List<CannotRemoveReason<SharedTomcatSite>> getCannotRemoveReasons() throws SQLException, IOExceptionDescription copied from interface:Removable
Lists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasons
in interfaceRemovable
- Returns:
- an empty
List<CannotRemoveReason>
if this object may be removed, or a list of descriptions - Throws:
SQLException
IOException
-
disable
- Specified by:
disable
in interfaceDisablable
- Throws:
IOException
SQLException
-
enable
- Specified by:
enable
in interfaceDisablable
- Throws:
IOException
SQLException
-
getInstallDirectory
- Throws:
SQLException
IOException
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
SharedTomcat>
-
isDisabled
public boolean isDisabled()Description copied from interface:Disablable
Checks if this object is disabled. This should execute very quickly (not incur any round-trip to any database) and thus does not throw any checked exceptions.- Specified by:
isDisabled
in interfaceDisablable
-
getDisableLog
- Specified by:
getDisableLog
in interfaceDisablable
- Throws:
SQLException
IOException
-
getHttpdTomcatVersion
- Throws:
SQLException
IOException
-
setHttpdTomcatVersion
- Throws:
IOException
SQLException
-
getLinuxServerAccount_pkey
public int getLinuxServerAccount_pkey() -
getLinuxServerAccount
- Throws:
SQLException
IOException
-
getLinuxServerGroup_pkey
public int getLinuxServerGroup_pkey() -
getLinuxServerGroup
- Throws:
SQLException
IOException
-
getName
-
getLinuxServer
- Throws:
SQLException
IOException
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
SharedTomcat>
-
getTomcat4Worker
- Throws:
SQLException
IOException
-
getTomcat4ShutdownKey
-
getTomcat4ShutdownPort
- Throws:
IOException
SQLException
-
isManual
public boolean isManual() -
setIsManual
- Throws:
IOException
SQLException
-
getMaxParameterCount
public int getMaxParameterCount()Gets themaxParameterCount
or-1
if not limited. -
setMaxParameterCount
- Throws:
IOException
SQLException
-
getMaxPostSize
public int getMaxPostSize()Gets themaxPostSize
or-1
if not limited. -
setMaxPostSize
- Throws:
IOException
SQLException
-
getUnpackWars
public boolean getUnpackWars()Gets theunpackWars
setting for this Tomcat. -
setUnpackWars
- Throws:
IOException
SQLException
-
getAutoDeploy
public boolean getAutoDeploy()Gets theautoDeploy
setting for this Tomcat. -
setAutoDeploy
- Throws:
IOException
SQLException
-
getUndeployOldVersions
public boolean getUndeployOldVersions()Gets theundeployOldVersions
setting for this Tomcat. -
setUndeployOldVersions
- Throws:
IOException
SQLException
-
getTomcatAuthentication
public boolean getTomcatAuthentication()Gets thetomcatAuthentication
setting for this Tomcat. -
setTomcatAuthentication
- Throws:
IOException
SQLException
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
SharedTomcat> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
read
readImpl method comment.- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
SharedTomcat> - Throws:
IOException
-
remove
Description copied from interface:Removable
Removes this object, and all dependant objects, from the system.- Specified by:
remove
in interfaceRemovable
- Throws:
IOException
SQLException
-
toStringImpl
Description copied from class:AoservObject
AoservObject.toString()
implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAoservObject.toString()
on the key (fromAoservObject.getKey()
). When the key isnull
, uses the default implementation fromObject.toString()
.- Overrides:
toStringImpl
in classCachedObjectIntegerKey<SharedTomcat>
- Throws:
SQLException
IOException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
SharedTomcat> - Throws:
IOException
-