akka.dispatch
Class ExecutionContexts

java.lang.Object
  extended by akka.dispatch.ExecutionContexts

public class ExecutionContexts
extends java.lang.Object

ExecutionContexts is the Java API for ExecutionContexts


Nested Class Summary
static class ExecutionContexts.sameThreadExecutionContext$
          WARNING: Not A General Purpose ExecutionContext!
 
Constructor Summary
ExecutionContexts()
           
 
Method Summary
static scala.concurrent.ExecutionContextExecutor fromExecutor(java.util.concurrent.Executor executor)
          Returns a new ExecutionContextExecutor which will delegate execution to the underlying Executor, and which will use the default error reporter.
static scala.concurrent.ExecutionContextExecutor fromExecutor(java.util.concurrent.Executor executor, Procedure<java.lang.Throwable> errorReporter)
          Returns a new ExecutionContextExecutor which will delegate execution to the underlying Executor, and which will use the provided error reporter.
static scala.concurrent.ExecutionContextExecutorService fromExecutorService(java.util.concurrent.ExecutorService executorService)
          Returns a new ExecutionContextExecutorService which will delegate execution to the underlying ExecutorService, and which will use the default error reporter.
static scala.concurrent.ExecutionContextExecutorService fromExecutorService(java.util.concurrent.ExecutorService executorService, Procedure<java.lang.Throwable> errorReporter)
          Returns a new ExecutionContextExecutorService which will delegate execution to the underlying ExecutorService, and which will use the provided error reporter.
static scala.concurrent.ExecutionContextExecutor global()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContexts

public ExecutionContexts()
Method Detail

fromExecutor

public static scala.concurrent.ExecutionContextExecutor fromExecutor(java.util.concurrent.Executor executor)
Returns a new ExecutionContextExecutor which will delegate execution to the underlying Executor, and which will use the default error reporter.

Parameters:
executor - the Executor which will be used for the ExecutionContext
Returns:
a new ExecutionContext

fromExecutor

public static scala.concurrent.ExecutionContextExecutor fromExecutor(java.util.concurrent.Executor executor,
                                                                     Procedure<java.lang.Throwable> errorReporter)
Returns a new ExecutionContextExecutor which will delegate execution to the underlying Executor, and which will use the provided error reporter.

Parameters:
executor - the Executor which will be used for the ExecutionContext
errorReporter - a Procedure that will log any exceptions passed to it
Returns:
a new ExecutionContext

fromExecutorService

public static scala.concurrent.ExecutionContextExecutorService fromExecutorService(java.util.concurrent.ExecutorService executorService)
Returns a new ExecutionContextExecutorService which will delegate execution to the underlying ExecutorService, and which will use the default error reporter.

Parameters:
executor - the ExecutorService which will be used for the ExecutionContext
executorService - (undocumented)
Returns:
a new ExecutionContext

fromExecutorService

public static scala.concurrent.ExecutionContextExecutorService fromExecutorService(java.util.concurrent.ExecutorService executorService,
                                                                                   Procedure<java.lang.Throwable> errorReporter)
Returns a new ExecutionContextExecutorService which will delegate execution to the underlying ExecutorService, and which will use the provided error reporter.

Parameters:
executor - the ExecutorService which will be used for the ExecutionContext
errorReporter - a Procedure that will log any exceptions passed to it
executorService - (undocumented)
Returns:
a new ExecutionContext

global

public static scala.concurrent.ExecutionContextExecutor global()
Returns:
a reference to the global ExecutionContext