public final class CallExecutor
extends java.lang.Object
ExecutorService interface, to allow execution of
the client method on a thread pool.| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
execute(MethodInfo methodInfo)
Retrieve the correct object and make a call on it.
|
static CallExecutor |
getInstance()
Get the CallExecutor instance.
|
static void |
setInstance()
Create the CallExecutor instance with a default number of threads, for example
ServiceConst.CALLTHREADS. |
static void |
setInstance(int numberOfThreads)
Create the CallExecutor instance with the indicated number of threads.
|
public static void setInstance()
ServiceConst.CALLTHREADS.
The executor is created only once and so the number of threads can be set only at the start.public static void setInstance(int numberOfThreads)
numberOfThreads - number of threads in the pool.public static CallExecutor getInstance()
null then a default instance is created.public java.lang.Object execute(MethodInfo methodInfo) throws java.lang.Exception
methodInfo - the method description.java.lang.Exception - any error.