AbstractMessageDispatcher

Abstract base class for message dispatchers that subscribe to topics.

This class extends SafeSubscriber to handle messages safely and provides lifecycle management for subscribing to and unsubscribing from topics.

Parameters

T

The type of message being dispatched

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val isDisposed: Boolean
Link copied to clipboard
abstract val name: String
Link copied to clipboard
abstract val topics: Set<Any>

The set of topics this dispatcher subscribes to.

Functions

Link copied to clipboard
fun cancel()
Link copied to clipboard
open override fun close()

Closes the dispatcher by canceling the subscription.

Link copied to clipboard
open fun currentContext(): Context?
Link copied to clipboard
open fun dispose()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun onNext(value: T?)
Link copied to clipboard
fun onSubscribe(s: Subscription?)
Link copied to clipboard
fun request(n: Long)
Link copied to clipboard
Link copied to clipboard
open override fun run()

Starts the dispatcher by subscribing to topics.

Link copied to clipboard
open fun safeOnNext(value: T)

Safely processes the next message.

Link copied to clipboard
open fun safeOnNextError(value: T, throwable: Throwable)

Handles errors that occur during message processing.

Link copied to clipboard
abstract fun start()

Starts the actual subscription to topics.