Package sk.ipesoft.d2000.d2japi
Interface AsynchronousExecutor
-
public interface AsynchronousExecutor
Interface for universal executor that can handle processing various callable objects or runnable method asynchronously with ability to return future.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Stop executing asynchronous tasks.void
execute(java.lang.Runnable runnableMethod)
Execute runnable object asynchronously.<V> java.util.concurrent.Future<V>
execute(java.util.concurrent.Callable<V> asyncMethod)
Execute callable object asynchronously and return result wrapped in Future.
-
-
-
Method Detail
-
execute
<V> java.util.concurrent.Future<V> execute(java.util.concurrent.Callable<V> asyncMethod)
Execute callable object asynchronously and return result wrapped in Future.- Type Parameters:
V
- Type of the actuall result- Parameters:
asyncMethod
- callable object to be called.- Returns:
- Future, that wraps asynchronously returned result.
-
execute
void execute(java.lang.Runnable runnableMethod)
Execute runnable object asynchronously.- Parameters:
runnableMethod
- runnable object to execute.
-
close
void close()
Stop executing asynchronous tasks.
-
-