@NotThreadSafe public class SingleThreadedActors extends Actors
ActorThread
s are not backed by real threads -
instead they will process messages when the processEventsUntilIdle()
method is called.Constructor and Description |
---|
SingleThreadedActors(EventizerProvider eventizerProvider,
FailureHandler failureHandler,
MessageListener messageListener) |
Modifier and Type | Method and Description |
---|---|
Executor |
getExecutor()
Returns an asynchronous
Executor which works the same way as all the actors in this container. |
void |
processEventsUntilIdle()
Processes in the current thread all messages which were sent to actors.
|
startActorThread
public SingleThreadedActors(EventizerProvider eventizerProvider, FailureHandler failureHandler, MessageListener messageListener)
public void processEventsUntilIdle()
CrashEarlyFailureHandler
, will rethrow uncaught exceptions from actors to the caller of this
method.public Executor getExecutor()
Executor
which works the same way as all the actors in this container. Useful in
tests to have asynchrony without the non-determinism of real threads.processEventsUntilIdle()
Copyright © 2011-2012. All Rights Reserved.