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
.
Create a callback that immediately returns the value
Create a callback that immediately returns the value
the successful value or error to complete with
returns a callback that will immediately fail with the given error
returns a callback that will immediately fail with the given error
the error to return
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!!
The future to convert
The executor actor to complete the callback
Callback linked to the Future
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
how long to wait before executing the callback
the callback to execute
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.
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
the value to complete with
Zip two Callbacks together into a single Callback
containing
a tuple of the results.