Object/Trait

colossus.service

Callback

Related Docs: trait Callback | package service

Permalink

object Callback

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

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. object FutureImplicits

    Permalink
  5. object Implicits

    Permalink
  6. def apply[I](f: ((Try[I]) ⇒ Unit) ⇒ Unit): Callback[I]

    Permalink

    Convert a function into a Callback.

    Convert a function into a Callback. The function's parameter is a continuation that will be the fully built mappings on the result Callback.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def complete[I](value: Try[I]): Callback[I]

    Permalink

    Create a callback that immediately returns the value

    Create a callback that immediately returns the value

    value

    the successful value or error to complete with

  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def failed[I](err: Throwable): Callback[I]

    Permalink

    returns a callback that will immediately fail with the given error

    returns a callback that will immediately fail with the given error

    err

    the error to return

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fromFuture[I](future: Future[I])(implicit executor: CallbackExecutor): Callback[I]

    Permalink

    Convert a Future to a Callback

    Convert a Future to a Callback

    Because Callbacks are expected to be handled entirely in a single thread, you must provide an executor actor which will finish processing the callback after the future is complete (eg if someone maps or flatMaps this callback

    IMPORTANT - the executor actor must be able to handle the CallbackExec message. All it has to do is call the execute() method. Or you can mixin the CallbackExecutor trait and compose handleCallback with your receives!!

    future

    The future to convert

    executor

    The executor actor to complete the callback

    returns

    Callback linked to the Future

  15. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def identity[A]: (A) ⇒ A

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def schedule[I](in: FiniteDuration)(cb: Callback[I])(implicit executor: CallbackExecutor): Callback[I]

    Permalink

    Schedule a callback to be executed after a delay

    Schedule a callback to be executed after a delay

    This method requires an implicit executor actor, which must be able to handle CallbackExec messages

    in

    how long to wait before executing the callback

    cb

    the callback to execute

  23. def sequence[A](callbacks: Seq[Callback[A]])(implicit arg0: ClassTag[A]): Callback[Seq[Try[A]]]

    Permalink

    Convert a sequence of Callbacks into a single Callback contains a sequence of all the results.

    Convert a sequence of Callbacks into a single Callback contains a sequence of all the results. The result type is Try[A] so that the success/failure of each individual Callback can be determined.

  24. def successful[I](value: I): Callback[I]

    Permalink

    returns a callback that will immediately succeed with the value as soon as its executed

    returns a callback that will immediately succeed with the value as soon as its executed

    value

    the value to complete with

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

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def zip[A, B](a: Callback[A], b: Callback[B]): Callback[(A, B)]

    Permalink

    Zip two Callbacks together into a single Callback containing a tuple of the results.

Inherited from AnyRef

Inherited from Any

Ungrouped