ProcessorLike

trait ProcessorLike[+Prod, +Repr] extends Future[Prod] with Model[Update[Prod, Repr]]

A processor extends a Future with the possibility of being observed and use-site induced abortion.

A processor extends a Future with the possibility of being observed and use-site induced abortion.

trait Model[Update[Prod, Repr]]
trait Future[Prod]
trait Awaitable[Prod]
class Object
trait Matchable
class Any
trait Processor[Prod]
trait AbstractProcessor[Prod]
class FutureWrapper[A]
trait ProcessorBase[Prod, Repr]
trait ProcessorImpl[Prod, Repr]

Value members

Abstract methods

def abort(): Unit

Asynchronously aborts the process. This method returns immediately. Once the process is aborted, it will dispatch an Aborted event. This method may be called repeatedly, although calling it twice does not have any particular effect.

Asynchronously aborts the process. This method returns immediately. Once the process is aborted, it will dispatch an Aborted event. This method may be called repeatedly, although calling it twice does not have any particular effect.

def progress: Double

Queries the correct progress which is value between 0.0 and 1.0

Queries the correct progress which is value between 0.0 and 1.0

Inherited methods

def addListener(pf: Listener[Update[Prod, Repr]]): pf

Registers a listener for updates from the model. A listener is simply a partial function which receives instances of U. Therefore the listener can decide with pattern match cases which updates it wants to handle.

Registers a listener for updates from the model. A listener is simply a partial function which receives instances of U. Therefore the listener can decide with pattern match cases which updates it wants to handle.

Example:

 m.addListener {
   case NcviewSync.Open(path) => ...
 }

Note: If the listener should be removed at some point, it is important to store it somewhere:

 val l: NcviewSync.Listener = { case NcviewSync.Open(path) => ... }
 m.addListener(l)
 ...
 m.removeListener(l)
Inherited from
Model
def andThen[U](pf: PartialFunction[Try[Prod], U])(executor: ExecutionContext): Future[Prod]
Inherited from
Future
def collect[S](pf: PartialFunction[Prod, S])(executor: ExecutionContext): Future[S]
Inherited from
Future
def failed: Future[Throwable]
Inherited from
Future
def fallbackTo[U >: Prod](that: Future[U]): Future[U]
Inherited from
Future
def filter(p: Prod => Boolean)(executor: ExecutionContext): Future[Prod]
Inherited from
Future
def flatMap[S](f: Prod => Future[S])(executor: ExecutionContext): Future[S]
Inherited from
Future
def flatten[S](ev: Prod <:< Future[S]): Future[S]
Inherited from
Future
def foreach[U](f: Prod => U)(executor: ExecutionContext): Unit
Inherited from
Future
def isCompleted: Boolean
Inherited from
Future
def map[S](f: Prod => S)(executor: ExecutionContext): Future[S]
Inherited from
Future
def mapTo[S](tag: ClassTag[S]): Future[S]
Inherited from
Future
def onComplete[U](f: Try[Prod] => U)(executor: ExecutionContext): Unit
Inherited from
Future
@throws(classOf[InterruptedException]) @throws(classOf[scala.concurrent.TimeoutException])
def ready(atMost: Duration)(permit: CanAwait): ProcessorLike[Prod, Repr]
Inherited from
Awaitable
def recover[U >: Prod](pf: PartialFunction[Throwable, U])(executor: ExecutionContext): Future[U]
Inherited from
Future
def recoverWith[U >: Prod](pf: PartialFunction[Throwable, Future[U]])(executor: ExecutionContext): Future[U]
Inherited from
Future
def removeListener(pf: Listener[Update[Prod, Repr]]): Unit

Un-registers a listener for updates from the model.

Un-registers a listener for updates from the model.

Inherited from
Model
@throws(classOf[InterruptedException]) @throws(classOf[scala.concurrent.TimeoutException])
def result(atMost: Duration)(permit: CanAwait): Prod
Inherited from
Awaitable
def transform[S](f: Try[Prod] => Try[S])(executor: ExecutionContext): Future[S]
Inherited from
Future
def transform[S](s: Prod => S, f: Throwable => Throwable)(executor: ExecutionContext): Future[S]
Inherited from
Future
def transformWith[S](f: Try[Prod] => Future[S])(executor: ExecutionContext): Future[S]
Inherited from
Future
def value: Option[Try[Prod]]
Inherited from
Future
final def withFilter(p: Prod => Boolean)(executor: ExecutionContext): Future[Prod]
Inherited from
Future
def zip[U](that: Future[U]): Future[(Prod, U)]
Inherited from
Future
def zipWith[U, R](that: Future[U])(f: (Prod, U) => R)(executor: ExecutionContext): Future[R]
Inherited from
Future