Interface TomcatConfigHelper

  • All Known Implementing Classes:
    DefaultTomcatConfigHelper

    @Internal
    @ParametersAreNonnullByDefault
    @ReturnValuesAreNonnullByDefault
    public interface TomcatConfigHelper
    Reads the Tomcat configuration. Intended only for internal consumption.
    Since:
    6.2.2, 6.7.0 became an interface
    • Method Detail

      • getConnectorPort

        Optional<String> getConnectorPort()
        Returns the connector port.
        Returns:
        empty if none is defined
      • getDatasourceCredentials

        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.
        Returns:
        the password if it's defined in a JNDI resource or blank
        Since:
        6.0
      • getDatasourceUrl

        Optional<String> getDatasourceUrl​(File xmlFile)
        Reads the datasource URL attribute from the given XML config file.
        Parameters:
        xmlFile - the tomcat context.xml file containing the JNDI datasource configuration
        Returns:
        the datasource url attribute, or empty if not found.
      • getJavaRuntimeDirectory

        String getJavaRuntimeDirectory()
        Returns the Java Runtime installation directory. Use this method to ensure that we always use same JRE with Confluence for Synchrony.
      • getMaxHttpThreads

        @Deprecated
        Optional<Integer> getMaxHttpThreads()
        Deprecated.
        since 7.12.3 use getAllMaxHttpThreads() Returns the maximum number of threads that can be used by Tomcat's default (first) HTTP connector.
        Returns:
        empty if it can't be determined
      • getAllMaxHttpThreads

        List<Optional<Integer>> getAllMaxHttpThreads()
        Returns:
        see above
        Since:
        7.12.3 Returns the maximum number of threads that can be used by each of Tomcat's HTTP connectors, and empty if it can't be determined for that particular one
      • getPotentialDatasourceLocations

        List<File> getPotentialDatasourceLocations()
        Returns the potential locations of datasource files.
        Returns:
        see above
      • getProxyPort

        Optional<Integer> getProxyPort()
        Returns the proxy port defined in server.xml.
        Returns:
        empty if none is defined
      • isStandardPort

        boolean isStandardPort​(int port)
        Indicates whether the given port is a standard HTTP port.
        Returns:
        see above