/**************************************************************************
 * copyright file="AsyncExecutor.java" company="Microsoft"
 *     Copyright (c) Microsoft Corporation.  All rights reserved.
 * 
 * Defines the AsyncExecutor.java.
 **************************************************************************/
package microsoft.exchange.webservices.data;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.RunnableFuture;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

 class AsyncExecutor extends ThreadPoolExecutor implements ExecutorService{
	
	int poolSize = 1;
	 
    int maxPoolSize = 1;
 
    long keepAliveTime = 10;
 
    final static ArrayBlockingQueue<Runnable> queue = 
    	new ArrayBlockingQueue<Runnable>(
            1);
	
	AsyncExecutor(){
		super(1,5,10,TimeUnit.SECONDS, queue);
	}
	
	
	
	
	 public <T> Future<T> submit(Callable<T> task,AsyncCallback callback) {
	        if (task == null) throw new NullPointerException();
	        RunnableFuture<T> ftask = newTaskFor(task);
	        execute(ftask);
	        if(callback != null)
	        	callback.setTask(ftask);
	        new Thread(callback).start();
	        return ftask;
	    }

}

@@ -654,17 +654,16 @@
 eUnit;%0A%0A
- 
 class As
@@ -731,91 +731,10 @@
 vice
-%7B%0A%09%0A%09int poolSize = 1;%0A%09 %0A    int maxPoolSize = 1;%0A %0A    long keepAliveTime = 10;%0A
  
+%7B
 %0A   
@@ -788,14 +788,8 @@
 e = 
-%0A    %09
 new 
@@ -821,26 +821,12 @@
 le%3E(
-%0A            
 1);%0A
-%09
 %0A%09As
@@ -884,23 +884,16 @@
 ue);%0A%09%7D%0A
-%09%0A%09%0A%09%0A%09
 %0A%09 publi
@@ -1231,11 +1231,10 @@
 %0A%09    %7D%0A
-%0A
 %7D%0A

Remove unused fields in AsyncExecutor