org.javasimon.callback.async
Class Executors.AsyncCallbackExecutor<T>

java.lang.Object
  extended by org.javasimon.callback.async.Executors.AsyncCallbackExecutor<T>
All Implemented Interfaces:
Executor<T>
Enclosing class:
Executors

private static class Executors.AsyncCallbackExecutor<T>
extends Object
implements Executor<T>

Asynchronous, different thread executor


Field Summary
private  ExecutorService executorService
          Used executor service
 
Constructor Summary
Executors.AsyncCallbackExecutor(ExecutorService executorService)
           
 
Method Summary
 T execute(Callable<T> callable)
          Main method of the executor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executorService

private final ExecutorService executorService
Used executor service

Constructor Detail

Executors.AsyncCallbackExecutor

public Executors.AsyncCallbackExecutor(ExecutorService executorService)
Method Detail

execute

public T execute(Callable<T> callable)
          throws Throwable
Description copied from interface: Executor
Main method of the executor

Specified by:
execute in interface Executor<T>
Parameters:
callable - Piece of code to execute
Returns:
Result of the execution
Throws:
Throwable - Raised when execution failed


Copyright © 2013. All Rights Reserved.