JdbcKontainer

interface JdbcKontainer : DatabaseKontainer

Provides JDBC specific extensions to Kontainer's interface.

Author

Scott Rossillo

Functions

Link copied to clipboard
abstract fun createJdbcUrl(): String

Returns a JDBC URL for connecting to this Kontainer's database.

Link copied to clipboard
abstract fun getAddress(): String?

Returns the platform assigned address at which this Kontainer can be reached the application that started this Kontainer. The returned address may be an IP address or hostname depending on the platform on which it's running.

Link copied to clipboard
abstract fun getDatabaseName(): String

Returns the name of this Kontainer's default database.

Link copied to clipboard
abstract fun getDirectAddress(): String?

Returns the platform assigned address at which this Kontainer can be directly reached by other Kontainers running on the platform.

Link copied to clipboard
abstract fun getPassword(): String

Returns this Kontainer's default database password.

Link copied to clipboard
abstract fun getPort(): Int?

Returns the platform assigned default port for this Kontainer. The default port is the first port specified by this Kontainer's KontainerSpec.

abstract fun getPort(containerPort: Int): Int?

Returns the platform assigned port mapped to the given exposed containerPort defined by this Kontainer's KontainerSpec.

Link copied to clipboard
abstract fun getUsername(): String

Returns this Kontainer's default database username.

Link copied to clipboard
abstract suspend fun remove()

Removes this Kontainer for the running platform. Once a Kontainer is removed, it cannot be restarted.

Link copied to clipboard
open fun removeSync()

Removes this Kontainer synchronously from the running platform.

Link copied to clipboard
abstract suspend fun start(timeout: Long)

Starts this Kontainer asynchronously with the given timeout.

Link copied to clipboard
open fun startSync(timeout: Long)

Starts this Kontainer synchronously with the given timeout, blocking the current thread until this Kontainer starts or the timeout is reached.

Properties

Link copied to clipboard
abstract val driverClassName: String

Name of the JDBC driver used to connect to this Kontainer's database.

Link copied to clipboard
abstract val id: String

The platform assigned identifier for this Kontainer.

Link copied to clipboard
abstract val kontainerSpec: KontainerSpec

The Kontainer specification for this Kontainer.