tuweni / org.apache.tuweni.hobbits / Relayer

Relayer

class Relayer : CoroutineScope (source)

Relays messages between two endpoints, with an interceptor reading passed messages.

Parameters

vertx - a Vert.x instance

bind - the endpoint to bind to

to - the endpoint to send to

interceptor - the interceptor function consuming messages being relayed

coroutineContext - the coroutine context of the relayer

Constructors

<init>

Relays messages between two endpoints, with an interceptor reading passed messages.

Relayer(vertx: Vertx, bind: String, to: String, interceptor: (Message) -> Unit, coroutineContext: CoroutineContext = Dispatchers.Default)

Properties

coroutineContext

the coroutine context of the relayer

val coroutineContext: CoroutineContext

Functions

start

Starts the relayer.

suspend fun start(): Unit

stop

Stops the relayer.

fun stop(): Unit