io.dylemma.frp

EventPipe

trait EventPipe[A, B] extends EventSource[B]

An EventPipe is a transformer that takes in events of type A from a single parent EventStream and produces any number of new events of type B in response.

To create an EventPipe, implement the two required methods:

protected def parent: EventStream[A]
protected def handle(event: Event[A]): 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[B], EventSourceImpl[B], EventStream[B], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EventPipe
  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: Event[A]): Boolean

    The handler method that will be automatically attached to the parent stream.

    The handler method that will be automatically attached to the parent stream. Generally, the body of this method will include a call to fire or stop in response to the event. The handler should return false if and only if it should be detached from the parent stream. Once it is detached, it will never be re-attached unless done explicitly.

    event

    An event sent from the parent stream.

    returns

    true to remain attached to the parent; false to detach.

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

    The stream that feeds events into this Pipe.

    The stream that feeds events into this Pipe. The handle method will automatically be attached to the parent, unless the parent is stopped, in which case this stream will automatically be stopped.

    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 EventPipe[A, B] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ++[A1 >: B](that: EventStream[A1]): EventStream[A1]

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

    Implicit information
    This member is added by an implicit conversion from EventPipe[A, B] to ArrowAssoc[EventPipe[A, B]] 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[B]

    Definition Classes
    EventSourceImpl
  11. def clone(): AnyRef

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

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

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

    Definition Classes
    EventSourceImpl
  15. def either[B](that: EventStream[B]): EventStream[Either[B, 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 EventPipe[A, B] to EventStreamFutures[B] performed by method EventStreamFutures in io.dylemma.frp.
    Definition Classes
    EventStreamFutures
  17. def ensuring(cond: (EventPipe[A, B]) ⇒ Boolean, msg: ⇒ Any): EventPipe[A, B]

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

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

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

    Implicit information
    This member is added by an implicit conversion from EventPipe[A, B] to Ensuring[EventPipe[A, B]] 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: (B) ⇒ Boolean): EventStream[B]

    Definition Classes
    EventSourceImpl
  24. def finalize(): Unit

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

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

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

    Definition Classes
    EventSourceImpl
  28. def foreach[U](f: (B) ⇒ 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 EventPipe[A, B] 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[B]]

    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[B]

    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 EventPipe[A, B] to EventStreamFutures[B] performed by method EventStreamFutures in io.dylemma.frp.
    Definition Classes
    EventStreamFutures
  35. def map[B](f: (B) ⇒ B): EventStream[B]

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

    Definition Classes
    AnyRef
  37. def next(implicit obs: Observer): Future[B]

    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 EventPipe[A, B] to EventStreamFutures[B] performed by method EventStreamFutures in io.dylemma.frp.
    Definition Classes
    EventStreamFutures
  38. final def notify(): Unit

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

    Definition Classes
    AnyRef
  40. 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
  41. def onNext(f: (B) ⇒ 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
  42. def produce(item: Event[B]): 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
  43. 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
  44. def sink(handler: (Event[B]) ⇒ 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
  45. def stop: Unit

    Definition Classes
    EventSource
  46. 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
  47. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  48. def take(count: Int): EventStream[B]

    Definition Classes
    EventSourceImpl
  49. def takeWhile(p: (B) ⇒ Boolean): EventStream[B]

    Definition Classes
    EventSourceImpl
  50. def toString(): String

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

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

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

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

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

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

    Definition Classes
    EventSourceImpl
  57. def within(duration: Duration): EventStream[B]

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

    Definition Classes
    EventSourceImpl
  59. def zipWithIndex: EventStream[(B, Int)]

    Definition Classes
    EventSourceImpl
  60. def zipWithStaleness: EventStream[(B, () ⇒ Boolean)]

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

    Definition Classes
    EventSourceImpl
  62. def ||[A1 >: B](that: EventStream[A1]): EventStream[A1]

    Definition Classes
    EventSourceImpl
  63. def [B](y: B): (EventPipe[A, B], B)

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

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from EventPipe[A, B] 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:
    (eventPipe: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from EventPipe[A, B] 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:
    (eventPipe: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: EventPipe[A, B]

    Implicit information
    This member is added by an implicit conversion from EventPipe[A, B] to ArrowAssoc[EventPipe[A, B]] 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:
    (eventPipe: ArrowAssoc[EventPipe[A, B]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: EventPipe[A, B]

    Implicit information
    This member is added by an implicit conversion from EventPipe[A, B] to Ensuring[EventPipe[A, B]] 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:
    (eventPipe: Ensuring[EventPipe[A, B]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from EventSource[B]

Inherited from EventSourceImpl[B]

Inherited from EventStream[B]

Inherited from AnyRef

Inherited from Any

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

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

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

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

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

Ungrouped