scuttlebutt-client-lib / org.apache.tuweni.scuttlebutt.lib.model / StreamHandler

StreamHandler

interface StreamHandler<T : Any> (source)

Functions

onMessage

abstract fun onMessage(item: T): Unit

Handles a new item from the result stream.

onStreamEnd

abstract fun onStreamEnd(): Unit

Invoked when the stream has been closed.

onStreamError

abstract fun onStreamError(ex: Exception): Unit

Invoked when there is an error in the stream.