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.String
getJavaRuntimeDirectory()
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
.boolean
isStandardPort(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:TomcatConfigHelper
Returns the proxy port defined inserver.xml
.- Specified by:
getProxyPort
in interfaceTomcatConfigHelper
- Returns:
- empty if none is defined
-
getConnectorPort
public Optional<String> getConnectorPort()
Description copied from interface:TomcatConfigHelper
Returns the connector port.- Specified by:
getConnectorPort
in interfaceTomcatConfigHelper
- Returns:
- empty if none is defined
-
getPotentialDatasourceLocations
public List<File> getPotentialDatasourceLocations()
Description copied from interface:TomcatConfigHelper
Returns the potential locations of datasource files.- Specified by:
getPotentialDatasourceLocations
in interfaceTomcatConfigHelper
- Returns:
- see above
-
getDatasourceCredentials
public Optional<org.apache.commons.lang3.tuple.Pair<String,String>> getDatasourceCredentials()
Description copied from interface:TomcatConfigHelper
Searches the password from the datasource that could be defined in one of the possible XML files.- Specified by:
getDatasourceCredentials
in 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:TomcatConfigHelper
Reads the datasource URL attribute from the given XML config file.- Specified by:
getDatasourceUrl
in 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:TomcatConfigHelper
Returns the Java Runtime installation directory. Use this method to ensure that we always use same JRE with Confluence for Synchrony.- Specified by:
getJavaRuntimeDirectory
in interfaceTomcatConfigHelper
-
isStandardPort
public boolean isStandardPort(int port)
Description copied from interface:TomcatConfigHelper
Indicates whether the given port is a standard HTTP port.- Specified by:
isStandardPort
in interfaceTomcatConfigHelper
- Returns:
- see above
-
getAllMaxHttpThreads
public List<Optional<Integer>> getAllMaxHttpThreads()
- Specified by:
getAllMaxHttpThreads
in interfaceTomcatConfigHelper
- Returns:
- see above
-
getMaxHttpThreads
@Deprecated public Optional<Integer> getMaxHttpThreads()
Deprecated.since 7.12.3 UsegetAllMaxHttpThreads()
- Specified by:
getMaxHttpThreads
in interfaceTomcatConfigHelper
- Returns:
- empty if it can't be determined
-
-