corda / net.corda.testing.driver / PortAllocation

PortAllocation

@DoNotImplement abstract class PortAllocation

An abstract helper class which is used within the driver to allocate unused ports for testing. Use either the Incremental or RandomFree concrete implementations.

Types

Incremental

class Incremental : PortAllocation

An implementation of PortAllocation which allocates ports sequentially

Constructors

<init>

PortAllocation()

An abstract helper class which is used within the driver to allocate unused ports for testing. Use either the Incremental or RandomFree concrete implementations.

Functions

nextHostAndPort

fun nextHostAndPort(): NetworkHostAndPort

Get the next available port via nextPort and then return a NetworkHostAndPort

nextPort

abstract fun nextPort(): Int

Get the next available port

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.

Inheritors

Incremental

class Incremental : PortAllocation

An implementation of PortAllocation which allocates ports sequentially