org.positronicnet.notifications

Actions

object Actions extends AnyRef

Actions that can be sent to org.positronicnet.notifications.Notifers.

Typical syntax is notifier ! action (to have the action performed on a background thread) or notifier.onThisThread(action) (to have the action performed on the current thread).

Many actions include a handler argument, which is a function that takes a notifier update as an argument. If the action is invoked as notifier ! action, it's assumed that the caller is on an Android HandlerThread; execution of the handler will be posted back to the HandlerThread. (This means that, in particular, if the caller is an application's main UI thread, it is safe to manipulate Views from within the handler.)

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Actions
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. case class Fetch [T] (handler: (T) ⇒ Unit) extends NotifierAction[T] with Product with Serializable

    Give a current snapshot of the notifier's state to the handler

  2. case class Requery [Q, R] (newQuery: Q) extends NotifierAction[R] with Product with Serializable

    Change the query for a NotifierWithQuery.

  3. case class StopWatcher [T] (key: AnyRef) extends NotifierAction[T] with Product with Serializable

    Cease notifications to a watcher added by AddWatcher

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. def AddWatcher [T] (key: AnyRef)(handler: (T) ⇒ Unit): AddWatcherAction[T]

    Action to add a watcher that gets notified when the state controlled by the notifier changes.

    Action to add a watcher that gets notified when the state controlled by the notifier changes. The handler is called on changes.

    If AddWatcher is sent as notifier ! AddWatcher..., the assumption is that the message is being sent from an Android HandlerThread (typically, an application's main "UI thread"), and invocations of the handler are posted back to that thread, which makes it safe for a handler to manipulate View objects, and so forth.

    The key is anything that can be used as a hash key; it is used in a subsequent StopWatcher call, to cease notifications.

  7. def AddWatcherAndFetch [T] (key: AnyRef)(handler: (T) ⇒ Unit): AddWatcherAndFetchAction[T]

    A combination of AddWatcher and Fetch, with the same handler used for both.

  8. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  9. def clone (): AnyRef

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

    Attributes
    final
    Definition Classes
    AnyRef
  11. def equals (arg0: Any): Boolean

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  14. def hashCode (): Int

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

    Attributes
    final
    Definition Classes
    Any
  16. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  17. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  18. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  19. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  20. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any