Trigger

class Trigger extends Channel[Unit]

Trigger is a convenience class wrapping Channel[Unit] specifically for scenarios where the value doesn't matter, just the reactions themselves.

Companion
object
class Channel[Unit]
trait Mutable[Unit]
trait Reactive[Unit]
class Object
trait Matchable
class Any

Value members

Concrete methods

def trigger(): Unit

Fires an event on this trigger

Fires an event on this trigger

Inherited methods

def !(future: Future[Unit])(implicit ec: ExecutionContext): Future[Unit]

Convenience functionality to assign the result of a future (upon completion) to this Channel

Convenience functionality to assign the result of a future (upon completion) to this Channel

Inherited from
Mutable
def &(that: Channel[Unit]): Channel[Unit]

Group multiple channels together

Group multiple channels together

Inherited from
Channel
def :=(f: => Unit): Unit

Convenience alternative to "set"

Convenience alternative to "set"

Inherited from
Mutable
def @=(f: Unit): Unit

Convenience alternative to "static"

Convenience alternative to "static"

Inherited from
Mutable
def and(that: Channel[Unit]): Channel[Unit]

Group multiple channels together

Group multiple channels together

Inherited from
Channel
def attach(f: Unit => Unit, priority: Double): Reaction[Unit]

Convenience method to create a Reaction to attach to this Reactive

Convenience method to create a Reaction to attach to this Reactive

Value Params
f

the function reaction

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def changes(f: (Unit, Unit) => Unit, priority: Double): Reaction[Unit]

Convenience method to create a Reaction to monitor changes to this Reactive

Convenience method to create a Reaction to monitor changes to this Reactive

Value Params
f

the function reaction to receive changes

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def collect[R](f: PartialFunction[Unit, R]): Channel[R]

Functional collection of this Channel into another Channel. All values received by this Channel will be collected and forwarded to the new Channel if they are collected by the conversion function.

Functional collection of this Channel into another Channel. All values received by this Channel will be collected and forwarded to the new Channel if they are collected by the conversion function.

Type Params
R

the type of the Channel

Value Params
f

conversion partial function

Returns

Channel[R]

Inherited from
Channel
def future(condition: Unit => Boolean): Future[Unit]

Convenience method to create a Future[T] that will complete upon the next reaction that meets to supplied condition.

Convenience method to create a Future[T] that will complete upon the next reaction that meets to supplied condition.

Value Params
condition

optional condition that must be true for this to fire (Defaults to accept anything)

Returns

Future[T]

Inherited from
Reactive
def map[R](f: Unit => R): Channel[R]

Functional mapping of this Channel into another Channel. All values received by this Channel will be mapped and forwarded to the new Channel.

Functional mapping of this Channel into another Channel. All values received by this Channel will be mapped and forwarded to the new Channel.

Type Params
R

the type of the new Channel

Value Params
f

conversion function

Returns

Channel[R]

Inherited from
Channel
def on(f: => Unit, priority: Double): Reaction[Unit]

Convenience method to create a Reaction to monitor changes to this Reactive when you don't care about the actual value.

Convenience method to create a Reaction to monitor changes to this Reactive when you don't care about the actual value.

Value Params
f

the function reaction to invoke in reaction to a value received

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def once(f: Unit => Unit, condition: Unit => Boolean, priority: Double): Reaction[Unit]

Convenience method to create a Reaction to monitor a single reaction based on an optional condition.

Convenience method to create a Reaction to monitor a single reaction based on an optional condition.

Value Params
condition

optional condition that must be true for this to fire (Defaults to accept anything)

f

the function reaction

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
override
def set(f: => Unit): Unit
Definition Classes
Inherited from
Channel
def static(f: Unit): Unit

Sets a static value representing the new value for this mutable entity

Sets a static value representing the new value for this mutable entity

Inherited from
Mutable
def status: Option[ReactionStatus]

If the current thread is reacting to a value currently, status represents the status of the reaction. This can be set to ReactionStatus.Stop in order to stop propagation. This can also be achieved via stopPropagation().

If the current thread is reacting to a value currently, status represents the status of the reaction. This can be set to ReactionStatus.Stop in order to stop propagation. This can also be achieved via stopPropagation().

Inherited from
Reactive
def status_=(status: ReactionStatus): Unit
Inherited from
Reactive
def stopPropagation(): Unit

Shortcut functionality to call status = ReactionStatus.Stop

Shortcut functionality to call status = ReactionStatus.Stop

Inherited from
Reactive
def update(f: => Unit): Unit

Convenience alternative to "set"

Convenience alternative to "set"

Inherited from
Mutable

Inherited fields

lazy
val reactions: Reactions[Unit]

Reactions currently associated with this Reactive

Reactions currently associated with this Reactive

Inherited from
Reactive