io.dylemma.frp

EventJoin

trait EventJoin[A, B, C] extends EventSource[C]

An EventJoin is a transformer that takes in events of type A and B from two parent EventStreams and produces any number of new events of type C in response.

To create an EventJoin, implement the three required methods:

protected def leftPparent: EventStream[A]
protected def rightParent: EventStream[B]
protected def handle(event: Either[Event[A], Event[B]]): Boolean

Generally, handle will call fire and/or stop. **Note:** to see the method signatures in this documentation, make sure to select "Visibility: All".

Linear Supertypes
EventSource[C], EventSourceImpl[C], EventStream[C], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EventJoin
  2. EventSource
  3. EventSourceImpl
  4. EventStream
  5. AnyRef
  6. Any
Implicitly
  1. by EventStreamFutures
  2. by any2stringadd
  3. by any2stringfmt
  4. by any2ArrowAssoc
  5. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def handle(event: Either[Event[A], Event[B]]): Boolean

    The method that reacts to events from the two parent streams.

    The method that reacts to events from the two parent streams. Generally, the body of this method will include calls to fire or stop, depending on the received event.

    **Note:** if both parents are stopped, this method will be ignored, and this EventJoin will automatically become stopped as well.

    event

    An event sent from one of the two parent streams. Events from the leftParent will be wrapped in a Left, while events from the rightParent will be wrapped in a Right.

    returns

    Whether or not to keep the handle method attached to the parent stream that sent the event. Returning true will maintain the attachment. Returning false will cause the corresponding parent to detach the handle.

    Attributes
    protected
  2. abstract def leftParent: EventStream[A]

    The "left" parent EventStream.

    The "left" parent EventStream. Events from this stream will be passed into the handle method, wrapped in a scala.util.Left.

    Attributes
    protected
  3. abstract def rightParent: EventStream[B]

    The "right" parent EventStream.

    The "right" parent EventStream. Events from this stream will be passed into the handle method, wrapped in a scala.util.Right.

    Attributes
    protected

Concrete 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. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ++[A1 >: C](that: EventStream[A1]): EventStream[A1]

    Definition Classes
    EventSourceImpl
  6. def ->[B](y: B): (EventJoin[A, B, C], B)

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to ArrowAssoc[EventJoin[A, B, C]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  7. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def before(deadline: Deadline): EventStream[C]

    Definition Classes
    EventSourceImpl
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def collect[B](pf: PartialFunction[C, B]): EventStream[B]

    Definition Classes
    EventSourceImpl
  13. def drop(count: Int): EventStream[C]

    Definition Classes
    EventSourceImpl
  14. def dropWhile(p: (C) ⇒ Boolean): EventStream[C]

    Definition Classes
    EventSourceImpl
  15. def either[B](that: EventStream[B]): EventStream[Either[C, B]]

    Definition Classes
    EventSourceImpl
  16. def end[T](implicit obs: Observer, time: Time[T]): Future[T]

    Returns a Future that will complete when this stream stops.

    Returns a Future that will complete when this stream stops. The resulting value will be a rough estimate (System.currentTimeMillis) of when the stream ended. If the stream never ends, the resulting Future will never complete.

    returns

    A Future containing a time stamp describing when this stream stopped.

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to EventStreamFutures[C] performed by method EventStreamFutures in io.dylemma.frp.
    Definition Classes
    EventStreamFutures
  17. def ensuring(cond: (EventJoin[A, B, C]) ⇒ Boolean, msg: ⇒ Any): EventJoin[A, B, C]

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to Ensuring[EventJoin[A, B, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: (EventJoin[A, B, C]) ⇒ Boolean): EventJoin[A, B, C]

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to Ensuring[EventJoin[A, B, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean, msg: ⇒ Any): EventJoin[A, B, C]

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to Ensuring[EventJoin[A, B, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean): EventJoin[A, B, C]

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to Ensuring[EventJoin[A, B, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  23. def filter(p: (C) ⇒ Boolean): EventStream[C]

    Definition Classes
    EventSourceImpl
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def fire(event: C): Unit

    Definition Classes
    EventSource
  26. def flatMap[B](f: (C) ⇒ EventStream[B]): EventStream[B]

    Definition Classes
    EventSourceImpl
  27. def foldLeft[B](z: B)(op: (B, C) ⇒ B): EventStream[B]

    Definition Classes
    EventSourceImpl
  28. def foreach[U](f: (C) ⇒ U)(implicit obs: Observer): Unit

    Attach an event handler for data fired by this stream.

    Attach an event handler for data fired by this stream.

    f

    A function that takes in an event data and performs side effects.

    Definition Classes
    EventStream
  29. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def grouped(size: Int): EventStream[List[C]]

    Definition Classes
    EventSourceImpl
  32. def hashCode(): Int

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

    Definition Classes
    Any
  34. def last(implicit obs: Observer): Future[C]

    Returns a Future that will complete with the value of the last event fired by this stream.

    Returns a Future that will complete with the value of the last event fired by this stream. If the stream is stopped or becomes stopped before firing an event, the Future will fail with a NoSuchElementException.

    returns

    A Future containing the last event fired by this stream.

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to EventStreamFutures[C] performed by method EventStreamFutures in io.dylemma.frp.
    Definition Classes
    EventStreamFutures
  35. lazy val leftHandlerFunc: (Event[A]) ⇒ Boolean

    This is needed so that the respective closure is not garbage-collected.

    This is needed so that the respective closure is not garbage-collected.

    Attributes
    protected
  36. def map[B](f: (C) ⇒ B): EventStream[B]

    Definition Classes
    EventSourceImpl
  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. def next(implicit obs: Observer): Future[C]

    Returns a Future that will complete with the value of the next event fired by this stream.

    Returns a Future that will complete with the value of the next event fired by this stream. If the stream is stopped, or if it stops before firing an event, the Future will fail with a NoSuchElementException.

    returns

    A Future containing the next event fired by this stream.

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to EventStreamFutures[C] performed by method EventStreamFutures in io.dylemma.frp.
    Definition Classes
    EventStreamFutures
  39. final def notify(): Unit

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

    Definition Classes
    AnyRef
  41. def onEnd(f: ⇒ Unit)(implicit obs: Observer): Unit

    Assign a block of code that will run when this stream stops.

    Assign a block of code that will run when this stream stops. If this stream is already stopped, the block of code will run immediately.

    f

    A block of code that will run when this stream sends a Stop event.

    Definition Classes
    EventStream
  42. def onNext(f: (C) ⇒ Unit)(implicit obs: Observer): Unit

    Assign a handler for the next event fired by this stream.

    Assign a handler for the next event fired by this stream.

    f

    A function that takes in an event data and performs side effects. It can be assumed that f will be run at most once.

    Definition Classes
    EventStream
  43. def parentsStopped: Boolean

    Checks whether both parent streams are stopped.

    Checks whether both parent streams are stopped.

    returns

    true if and only if both the leftParent and rightParent streams are stopped.

  44. def produce(item: Event[C]): Unit

    Produce a new item.

    Produce a new item. All handler functions will be called with item as the argument. There is no guarantee of the order in which the handler functions will be called.

    item

    The item to be sent to all handlers (sinks).

    Attributes
    protected
    Definition Classes
    EventSource
  45. def purgeThreshold: Int

    A number indicating the minimum number of cleared references that must be encountered before purging all cleared references from the list.

    A number indicating the minimum number of cleared references that must be encountered before purging all cleared references from the list. This method may be overridden - the default value is 5.

    Attributes
    protected
    Definition Classes
    EventSource
  46. lazy val rightHandlerFunc: (Event[B]) ⇒ Boolean

    This is needed so that the respective closure is not garbage-collected.

    This is needed so that the respective closure is not garbage-collected.

    Attributes
    protected
  47. def sink(handler: (Event[C]) ⇒ Boolean)(implicit obs: Observer): Unit

    Add a handler function that acts as a sink for items produced by this Source.

    Add a handler function that acts as a sink for items produced by this Source. The handler is expected to return true as long as it remains active. Once the handler function returns false in response to some produced item, it will be deactivated and will no longer receive new items. There is no guarantee of the order that handlers will be called.

    handler

    The handler function to receive items produced by this Source. Once the handler returns false in response to some produced item, it will be deactivated and will no longer receive new items.

    obs

    An implicit Observer which is required in order to properly manage references between this Source and any handlers, avoiding reference loops.

    Definition Classes
    EventStream
  48. def stop: Unit

    Definition Classes
    EventSource
  49. def stopped: Boolean

    Marks whether or not this stream is stopped.

    Marks whether or not this stream is stopped. A stopped stream will not produce any more events.

    returns

    true if this stream is stopped, false otherwise.

    Definition Classes
    EventSourceEventStream
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def take(count: Int): EventStream[C]

    Definition Classes
    EventSourceImpl
  52. def takeWhile(p: (C) ⇒ Boolean): EventStream[C]

    Definition Classes
    EventSourceImpl
  53. def toString(): String

    Definition Classes
    AnyRef → Any
  54. def until(end: EventStream[_]): EventStream[C]

    Definition Classes
    EventSourceImpl
  55. def unzip[A1, A2](implicit asPair: (C) ⇒ (A1, A2)): (EventStream[A1], EventStream[A2])

    Definition Classes
    EventSourceImpl
  56. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. def withFilter(p: (C) ⇒ Boolean): EventStream[C]

    Definition Classes
    EventSourceImpl
  60. def within(duration: Duration): EventStream[C]

    Definition Classes
    EventSourceImpl
  61. def zip[B](that: EventStream[B]): EventStream[(C, B)]

    Definition Classes
    EventSourceImpl
  62. def zipWithIndex: EventStream[(C, Int)]

    Definition Classes
    EventSourceImpl
  63. def zipWithStaleness: EventStream[(C, () ⇒ Boolean)]

    Definition Classes
    EventSourceImpl
  64. def zipWithTime[T](implicit arg0: Time[T]): EventStream[(C, T)]

    Definition Classes
    EventSourceImpl
  65. def ||[A1 >: C](that: EventStream[A1]): EventStream[A1]

    Definition Classes
    EventSourceImpl
  66. def [B](y: B): (EventJoin[A, B, C], B)

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to ArrowAssoc[EventJoin[A, B, C]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (eventJoin: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (eventJoin: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: EventJoin[A, B, C]

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to ArrowAssoc[EventJoin[A, B, C]] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (eventJoin: ArrowAssoc[EventJoin[A, B, C]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: EventJoin[A, B, C]

    Implicit information
    This member is added by an implicit conversion from EventJoin[A, B, C] to Ensuring[EventJoin[A, B, C]] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (eventJoin: Ensuring[EventJoin[A, B, C]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from EventSource[C]

Inherited from EventSourceImpl[C]

Inherited from EventStream[C]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion EventStreamFutures from EventJoin[A, B, C] to EventStreamFutures[C]

Inherited by implicit conversion any2stringadd from EventJoin[A, B, C] to StringAdd

Inherited by implicit conversion any2stringfmt from EventJoin[A, B, C] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from EventJoin[A, B, C] to ArrowAssoc[EventJoin[A, B, C]]

Inherited by implicit conversion any2Ensuring from EventJoin[A, B, C] to Ensuring[EventJoin[A, B, C]]

Ungrouped