Interface ContainerConfig


public interface ContainerConfig
Configuration details associated with a container.
  • Method Details

    • platform

      String platform()
      Return the type of container. postgres, mysql, elastic etc.
    • containerName

      String containerName()
      Return the container name.
    • version

      String version()
      Return the image version.
    • port

      int port()
      Return the port this container is using.

      This is typically useful if the container was started with a random port and, we need to know what that port was.

    • jdbcUrl

      String jdbcUrl()
      Return a DB connection url or null if not a database container.
    • jdbcExtraUrl

      String jdbcExtraUrl()
      Return a DB connection url or null for the extra database.
    • jdbcAdminUrl

      String jdbcAdminUrl()
      Return a DB connection url for the admin database user.
    • createConnection

      Connection createConnection() throws SQLException
      Return a DB connection.
      Throws:
      SQLException
    • createConnectionNoSchema

      Connection createConnectionNoSchema() throws SQLException
      Return a DB connection without schema (as it maybe is not created yet).
      Throws:
      SQLException
    • createAdminConnection

      Connection createAdminConnection() throws SQLException
      Return a DB connection using the admin user.
      Throws:
      SQLException
    • createAdminConnection

      Connection createAdminConnection(String url) throws SQLException
      Return a DB connection using the admin user with the given jdbc url.
      Throws:
      SQLException
    • startDescription

      String startDescription()
      Return a good description for starting the container typically for logging.
    • stopDescription

      String stopDescription()
      Return a good description for stopping the container typically for logging.