HandlerContext

kreuzberg.HandlerContext
trait HandlerContext extends ModelValueProvider, ServiceRepository, ExecutionContext

Context for imperative Event Handlers

Attributes

Graph
Supertypes
trait ExecutionContext
class Object
trait Matchable
class Any
Show all

Members list

Value members

Abstract methods

def setModel[T](model: Model[T], value: T): Unit

Issue a model change.

Issue a model change.

Attributes

def setProperty[D <: ScalaJsElement, T](property: JsProperty[D, T], value: T): Unit

Set some JavaScript property.

Set some JavaScript property.

Attributes

def state[T](state: RuntimeState[T]): T

Read some JavaScript state.

Read some JavaScript state.

Attributes

def triggerChannel[T](channel: Channel[T], value: T): Unit

Trigger a channel.

Trigger a channel.

Attributes

def triggerSink[E](sink: EventSink[E], value: E): Unit

Call another Event sink

Call another Event sink

Attributes

def updateModel[T](model: Model[T], updateFn: T => T): Unit

Update model, existing to new state

Update model, existing to new state

Attributes

Inherited methods

def execute(runnable: Runnable): Unit

Attributes

Inherited from:
ExecutionContext
def reportFailure(cause: Throwable): Unit

Attributes

Inherited from:
ExecutionContext
def service[S](using snp: ServiceNameProvider[S]): S

Returns a service, given it's name provider

Returns a service, given it's name provider

Attributes

Inherited from:
ServiceRepository
def serviceOption[S](using snp: ServiceNameProvider[S]): Option[S]

Returns a service if given.

Returns a service if given.

Attributes

Inherited from:
ServiceRepository
def value[M](model: Subscribeable[M]): M

Returns the value of a model.

Returns the value of a model.

Attributes

Inherited from:
ModelValueProvider

Deprecated and Inherited methods

def prepare(): ExecutionContext

Attributes

Deprecated
[Since version 2.12.0] preparation of ExecutionContexts will be removed
Inherited from:
ExecutionContext