Accissibility fix when invoking callback method

This commit is contained in:
Kelven Yang 2013-01-03 17:55:47 -08:00
parent 3435ee0604
commit ed17281f0d
2 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class AsyncCallFuture<T> implements Future<T> {
public class AsyncCallFuture<T> implements Future<T>, AsyncCompletionCallback<T> {
Object _completed = new Object();
boolean _done = false;
@ -72,6 +72,7 @@ public class AsyncCallFuture<T> implements Future<T> {
return _done;
}
@Override
public void complete(T resultObject) {
_resultObject = resultObject;
synchronized(_completed) {

View File

@ -61,6 +61,7 @@ public class AsyncCallbackDispatcher<T, R> implements AsyncCompletionCallback {
public Object intercept(Object arg0, Method arg1, Object[] arg2,
MethodProxy arg3) throws Throwable {
_callbackMethod = arg1;
_callbackMethod.setAccessible(true);
return null;
}
},