ConnectableInputChannel

Input channel that can be manually connected to an output channel.

Parameters

ItemT

the type of items transmitted through this channel

ChannelT

the channel type (Push or Pull)

Inheritors

Properties

Link copied to clipboard
abstract val downstreamNode: Node

The Node that receives data through this input channel.

Link copied to clipboard
abstract val upstream: OutputChannel<*, ChannelT>

The output channel connected upstream.

Functions

Link copied to clipboard
context(_: Simulator)
fun PushInputChannel<*>.close()

Closes this push input channel to prevent further data transfers.

Link copied to clipboard

Checks if this input channel uses pull semantics.

Link copied to clipboard

Checks if this input channel uses push semantics.

Link copied to clipboard

Checks if this pull input channel is ready to receive data.

Link copied to clipboard
fun <T> PushInputChannel<T>.onReceive(callback: context(Simulator) (T) -> Unit)

Sets the callback that will be invoked when data is received on this channel.

Link copied to clipboard
context(_: Simulator)
fun PushInputChannel<*>.open()

Opens this push input channel to allow data transfers.

Link copied to clipboard
context(_: Simulator)
fun <T> PullInputChannel<T>.receive(): T

Receives data from this pull input channel.

Link copied to clipboard
fun PullInputChannel<*>.whenNotReady(callback: context(Simulator) () -> Unit)

Registers a callback to be invoked when this channel becomes not ready.

Link copied to clipboard
fun PullInputChannel<*>.whenReady(callback: context(Simulator) () -> Unit)

Registers a callback to be invoked when this channel becomes ready.