Class DefaultTomcatConfigHelper
- java.lang.Object
-
- com.atlassian.confluence.impl.util.tomcat.DefaultTomcatConfigHelper
-
- All Implemented Interfaces:
TomcatConfigHelper
@Internal public class DefaultTomcatConfigHelper extends Object implements TomcatConfigHelper
Production implementation ofTomcatConfigHelper.- Since:
- 6.2.2
-
-
Constructor Summary
Constructors Constructor Description DefaultTomcatConfigHelper(MBeanServer mBeanServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Optional<Integer>>getAllMaxHttpThreads()Optional<String>getConnectorPort()Returns the connector port.Optional<org.apache.commons.lang3.tuple.Pair<String,String>>getDatasourceCredentials()Searches the password from the datasource that could be defined in one of the possible XML files.Optional<String>getDatasourceUrl(File xmlFile)Reads the datasource URL attribute from the given XML config file.StringgetJavaRuntimeDirectory()Returns the Java Runtime installation directory.Optional<Integer>getMaxHttpThreads()Deprecated.since 7.12.3 UsegetAllMaxHttpThreads()List<File>getPotentialDatasourceLocations()Returns the potential locations of datasource files.Optional<Integer>getProxyPort()Returns the proxy port defined inserver.xml.booleanisStandardPort(int port)Indicates whether the given port is a standard HTTP port.
-
-
-
Constructor Detail
-
DefaultTomcatConfigHelper
public DefaultTomcatConfigHelper(MBeanServer mBeanServer)
-
-
Method Detail
-
getProxyPort
public Optional<Integer> getProxyPort()
Description copied from interface:TomcatConfigHelperReturns the proxy port defined inserver.xml.- Specified by:
getProxyPortin interfaceTomcatConfigHelper- Returns:
- empty if none is defined
-
getConnectorPort
public Optional<String> getConnectorPort()
Description copied from interface:TomcatConfigHelperReturns the connector port.- Specified by:
getConnectorPortin interfaceTomcatConfigHelper- Returns:
- empty if none is defined
-
getPotentialDatasourceLocations
public List<File> getPotentialDatasourceLocations()
Description copied from interface:TomcatConfigHelperReturns the potential locations of datasource files.- Specified by:
getPotentialDatasourceLocationsin interfaceTomcatConfigHelper- Returns:
- see above
-
getDatasourceCredentials
public Optional<org.apache.commons.lang3.tuple.Pair<String,String>> getDatasourceCredentials()
Description copied from interface:TomcatConfigHelperSearches the password from the datasource that could be defined in one of the possible XML files.- Specified by:
getDatasourceCredentialsin interfaceTomcatConfigHelper- Returns:
- the password if it's defined in a JNDI resource or blank
-
getDatasourceUrl
public Optional<String> getDatasourceUrl(File xmlFile)
Description copied from interface:TomcatConfigHelperReads the datasource URL attribute from the given XML config file.- Specified by:
getDatasourceUrlin interfaceTomcatConfigHelper- Parameters:
xmlFile- the tomcat context.xml file containing the JNDI datasource configuration- Returns:
- the datasource url attribute, or empty if not found.
-
getJavaRuntimeDirectory
public String getJavaRuntimeDirectory()
Description copied from interface:TomcatConfigHelperReturns the Java Runtime installation directory. Use this method to ensure that we always use same JRE with Confluence for Synchrony.- Specified by:
getJavaRuntimeDirectoryin interfaceTomcatConfigHelper
-
isStandardPort
public boolean isStandardPort(int port)
Description copied from interface:TomcatConfigHelperIndicates whether the given port is a standard HTTP port.- Specified by:
isStandardPortin interfaceTomcatConfigHelper- Returns:
- see above
-
getAllMaxHttpThreads
public List<Optional<Integer>> getAllMaxHttpThreads()
- Specified by:
getAllMaxHttpThreadsin interfaceTomcatConfigHelper- Returns:
- see above
-
getMaxHttpThreads
@Deprecated public Optional<Integer> getMaxHttpThreads()
Deprecated.since 7.12.3 UsegetAllMaxHttpThreads()- Specified by:
getMaxHttpThreadsin interfaceTomcatConfigHelper- Returns:
- empty if it can't be determined
-
-