Package play.libs.concurrent
Class ClassLoaderExecution
- Object
-
- play.libs.concurrent.ClassLoaderExecution
-
public class ClassLoaderExecution extends Object
ExecutionContexts that preserve the current thread's context ClassLoader by passing it throughClassLoaderExecutionContext
.
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderExecution()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static scala.concurrent.ExecutionContextExecutor
fromThread(Executor delegate)
An ExecutionContext that executes work on the given ExecutionContext.static scala.concurrent.ExecutionContextExecutor
fromThread(scala.concurrent.ExecutionContext delegate)
An ExecutionContext that executes work on the given ExecutionContext.static scala.concurrent.ExecutionContextExecutor
fromThread(scala.concurrent.ExecutionContextExecutor delegate)
An ExecutionContext that executes work on the given ExecutionContext.
-
-
-
Method Detail
-
fromThread
public static scala.concurrent.ExecutionContextExecutor fromThread(scala.concurrent.ExecutionContext delegate)
An ExecutionContext that executes work on the given ExecutionContext. The current thread's context ClassLoader is captured when this method is called and preserved for all executed tasks.- Parameters:
delegate
- the delegate execution context.- Returns:
- the execution context wrapped in an
ClassLoaderExecutionContext
.
-
fromThread
public static scala.concurrent.ExecutionContextExecutor fromThread(scala.concurrent.ExecutionContextExecutor delegate)
An ExecutionContext that executes work on the given ExecutionContext. The current thread's context ClassLoader is captured when this method is called and preserved for all executed tasks.- Parameters:
delegate
- the delegate execution context.- Returns:
- the execution context wrapped in an
ClassLoaderExecutionContext
.
-
fromThread
public static scala.concurrent.ExecutionContextExecutor fromThread(Executor delegate)
An ExecutionContext that executes work on the given ExecutionContext. The current thread's context ClassLoader is captured when this method is called and preserved for all executed tasks.- Parameters:
delegate
- the delegate execution context.- Returns:
- the execution context wrapped in an
ClassLoaderExecutionContext
.
-
-