org.reactress

Reactive

object Reactive

Contains useful Reactive implementations and factory methods.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Reactive
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class BindEmitter[T] extends Reactive[T] with Default[T] with Subscriptions

    A reactive emitter that can be used with the mutate block.

  2. trait Default[T] extends Reactive[T]

    The default implementation of a reactive value.

  3. class Emitter[T] extends Reactive[T] with Default[T]

    A reactive value that can programatically emit events.

  4. trait Never[T] extends Reactive[T]

    A base trait for reactives that never emit events.

  5. trait Proxy[T] extends Reactive[T]

    The proxy reactive that emits events of its underlying reactive.

  6. trait ProxySubscription extends Subscription

    Unsubscribes by calling unsubscribe on the underlying subscription.

  7. implicit class ReactiveOps[T] extends AnyRef

  8. trait Subscription extends AnyRef

    A subscription to a certain kind of event, event processing or computation in general.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def CompositeSubscription(ss: Subscription*): Subscription

    Unsubscribing will call unsubscribe on all the subscriptions in ss.

    Unsubscribing will call unsubscribe on all the subscriptions in ss.

    ss

    the child subscriptions

    returns

    the composite subscription

  7. def Never[T]: Reactive[T]

    A reactive that never emits events.

    A reactive that never emits events.

    T

    type of events in this reactive

  8. object Subscription

    Contains factory methods for subscription.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def items[T](events: Array[T]): Reactive[T]

    Defines a new passive reactive that emits several events to any new subscriber.

    Defines a new passive reactive that emits several events to any new subscriber.

    T

    type of the events to emit

    events

    events to emit

    returns

    a reactive that emits the specified events

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def passive[T](f: (Reactor[T]) ⇒ Subscription): Reactive[T]

    Creates a new reactive that invokes the function f on any Reactor that subscribes to it.

    Creates a new reactive that invokes the function f on any Reactor that subscribes to it.

    Passive reactives usually emit separate event streams to each reactor for which onReaction has been called.

    Once all the events are emitted, clients should call unreact to notify the reactor that there will be no more events.

    Example:

    val r = passive[Int] { reactor =>
    reactor.react(1)
    reactor.react(2)
    reactor.unreact()
    }

    Never use passive to install adapt a callback in a 3rd party API. For example, *never* do this:

    val r = passive[String] { reactor =>
      Future { "... " * 5 + "done!" } onSuccess {
        case e => reactor.react(e); reactor.unreact()
      }
    }
    val m = Signal.Mutable(mutable.ArrayBuffer[String]())
    val s1 = r.onEvent(e => m += e)
    val s2 = r.onEvent(e => m += e)

    Above, subscriptions s1 and s2 could execute concurrenctly and corrupt the buffer.

    T

    type of the events in this passive reactive

    f

    function to execute on any newly subscribed reactor

    returns

    the passive reactive defined by f

    Note

    You should never use this method to bind reactors to bind reactors to custom callbacks in 3rd party APIs. Those callbacks may execute on another thread, and that is *unsafe*.

  22. def single[T](event: T): Reactive[T]

    Defines a new passive reactive that emits a single event to any new subscriber.

    Defines a new passive reactive that emits a single event to any new subscriber.

    T

    type of the event to emit

    event

    event to emit

    returns

    a reactive that emits a single event

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped