play
类 Invoker

java.lang.Object
  继承者 play.Invoker

public class Invoker
extends java.lang.Object

Run some code in a Play! context


嵌套类摘要
static class Invoker.DirectInvocation
          A direct invocation (in the same thread than caller)
static class Invoker.Invocation
          An Invocation in something to run in a Play!
static class Invoker.InvocationContext
          The class/method that will be invoked by the current operation
static class Invoker.Suspend
          Throwable to indicate that the request must be suspended
 
字段摘要
static java.util.concurrent.ScheduledThreadPoolExecutor executor
          Main executor for requests invocations.
 
构造方法摘要
Invoker()
           
 
方法摘要
static java.util.concurrent.Future<?> invoke(Invoker.Invocation invocation)
          Run the code in a new thread took from a thread pool.
static java.util.concurrent.Future<?> invoke(Invoker.Invocation invocation, long millis)
          Run the code in a new thread after a delay
static void invokeInThread(Invoker.DirectInvocation invocation)
          Run the code in the same thread than caller.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

executor

public static java.util.concurrent.ScheduledThreadPoolExecutor executor
Main executor for requests invocations.

构造方法详细信息

Invoker

public Invoker()
方法详细信息

invoke

public static java.util.concurrent.Future<?> invoke(Invoker.Invocation invocation)
Run the code in a new thread took from a thread pool.

参数:
invocation - The code to run
返回:
The future object, to know when the task is completed

invoke

public static java.util.concurrent.Future<?> invoke(Invoker.Invocation invocation,
                                                    long millis)
Run the code in a new thread after a delay

参数:
invocation - The code to run
millis - The time to wait before, in milliseconds
返回:
The future object, to know when the task is completed

invokeInThread

public static void invokeInThread(Invoker.DirectInvocation invocation)
Run the code in the same thread than caller.

参数:
invocation - The code to run


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly