object Callback
- Alphabetic
- By Inheritance
- Callback
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[E]: Builders[E]
For building Callback objects using the Partially-Applied Type technique.
For building Callback objects using the Partially-Applied Type technique.
For example these are Equivalent:
Callback[Throwable, Throwable].empty[String] <-> Callback.empty[Throwable, String]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
empty[E, A](implicit r: UncaughtExceptionReporter): Callback[E, A]
Creates an empty Callback, a callback that doesn't do anything in
onNext
and that logs errors inonError
with the provided monix.execution.UncaughtExceptionReporter. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
forked[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A]
Given a Callback wraps it into an implementation that calls
onSuccess
andonError
asynchronously, using the given scala.concurrent.ExecutionContext.Given a Callback wraps it into an implementation that calls
onSuccess
andonError
asynchronously, using the given scala.concurrent.ExecutionContext.The async boundary created is "light", in the sense that a TrampolinedRunnable is used and supporting schedulers can execute these using an internal trampoline, thus execution being faster and immediate, but still avoiding growing the call-stack and thus avoiding stack overflows.
- See also
-
def
fromAttempt[E, A](cb: (Either[E, A]) ⇒ Unit): Callback[E, A]
Turns
Either[Throwable, A] => Unit
callbacks into Monix callbacks.Turns
Either[Throwable, A] => Unit
callbacks into Monix callbacks.These are common within Cats' implementation, used for example in
cats.effect.IO
. -
def
fromPromise[A](p: Promise[A]): Callback[Throwable, A]
Returns a Callback instance that will complete the given promise.
-
def
fromTry[A](cb: (Try[A]) ⇒ Unit): Callback[Throwable, A]
Turns
Try[A] => Unit
callbacks into Monix callbacks.Turns
Try[A] => Unit
callbacks into Monix callbacks.These are common within Scala's standard library implementation, due to usage with Scala's
Future
. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
safe[E, A](cb: Callback[E, A])(implicit r: UncaughtExceptionReporter): Callback[E, A]
Wraps any Callback into a safer implementation that protects against grammar violations (e.g.
Wraps any Callback into a safer implementation that protects against grammar violations (e.g.
onSuccess
oronError
must be called at most once). For usage inrunAsync
. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trampolined[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A]
Given a Callback wraps it into an implementation that calls
onSuccess
andonError
asynchronously, using the given scala.concurrent.ExecutionContext.Given a Callback wraps it into an implementation that calls
onSuccess
andonError
asynchronously, using the given scala.concurrent.ExecutionContext.The async boundary created is "light", in the sense that a TrampolinedRunnable is used and supporting schedulers can execute these using an internal trampoline, thus execution being faster and immediate, but still avoiding growing the call-stack and thus avoiding stack overflows.
- See also
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )