io.dylemma.frp

EventSource

trait EventSource[A] extends EventStream[A] with EventSourceImpl[A]

EventSource is an implementation of EventStream that adds fire and stop methods. Usage in client code will generally look something like

class CoolThings {
	private val _events = EventSource[Thing]

	// don't expose `fire` and `stop` publicly: EventStream is read-only
	def events: EventStream[Thing] = _events

	def doThings = { events fire new Thing(...) }
}
Linear Supertypes
EventSourceImpl[A], EventStream[A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EventSource
  2. EventSourceImpl
  3. EventStream
  4. AnyRef
  5. 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

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

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

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

    Definition Classes
    EventSourceImpl
  11. def clone(): AnyRef

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

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

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

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

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

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

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

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

    Definition Classes
    EventSourceImpl
  24. def finalize(): Unit

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

  26. def flatMap[B](f: (A) ⇒ EventStream[B]): EventStream[B]

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

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

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

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

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

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

    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 EventSource[A] to EventStreamFutures[A] 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: (A) ⇒ 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[A]): 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
  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
  44. def sink(handler: (Event[A]) ⇒ 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

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

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

    Definition Classes
    EventSourceImpl
  50. def toString(): String

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

    Definition Classes
    EventSourceImpl
  52. def unzip[A1, A2](implicit asPair: (A) ⇒ (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: (A) ⇒ Boolean): EventStream[A]

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

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

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

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

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

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

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

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

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

Deprecated Value Members

  1. def x: EventSource[A]

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

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: EventSource[A]

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

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from EventSourceImpl[A]

Inherited from EventStream[A]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion EventStreamFutures from EventSource[A] to EventStreamFutures[A]

Inherited by implicit conversion any2stringadd from EventSource[A] to StringAdd

Inherited by implicit conversion any2stringfmt from EventSource[A] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from EventSource[A] to ArrowAssoc[EventSource[A]]

Inherited by implicit conversion any2Ensuring from EventSource[A] to Ensuring[EventSource[A]]

Ungrouped