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

StreamHandler

interface StreamHandler<T : Any!> (source)

A handler consuming a stream.

Functions

onMessage

Handles a new item from the result stream.

abstract fun onMessage(item: T): Unit

onStreamEnd

Invoked when the stream has been closed.

abstract fun onStreamEnd(): Unit

onStreamError

Invoked when there is an error in the stream.

abstract fun onStreamError(ex: Exception!): Unit