TransportProvider

A topic transport: what opens the broker a node's published streams, its commands to other contexts and their receipts go through. Wow's Kafka transport (kafka) is a provider as a community one, a Pulsar transport say, is: the host finds them on the classpath (ServiceLoader, from the module's META-INF/services/me.ahoo.wow.spi.transport.TransportProvider) and among the application's beans, a bean taking the place of a provider of its type on the classpath, as it finds a me.ahoo.wow.spi.store.StoreProvider.

A provider is stateless: open gives each configured transport its own TopicTransport, over the settings TransportConfig.options holds and the application's TransportConfig.resources.

Properties

Link copied to clipboard

Every setting of its own it reads from TransportConfig.options, each read through its option, for the host to bind and check (wow.<type>.<key>); a transport has no instances of its own, so it reads a ProviderOption.Scope.PER_STORE option as one of its type. The settings every topic transport has (TopicTransportOptions) are not listed again: TopicTransportOptions.of joins them.

Link copied to clipboard

What a transport of this type needs, in the words of a startup failure that says it is missing.

Link copied to clipboard
abstract val type: String

The type a transport's configuration names: lowercase, unique among the providers of a node.

Functions

Link copied to clipboard
abstract fun available(config: TransportConfig): Boolean

Whether config configures a transport of this type: the settings it cannot do without are set.

Link copied to clipboard
abstract fun open(config: TransportConfig): TopicTransport

Opens the transport config configures.