mirror of https://github.com/apache/cloudstack.git
Accissibility fix when invoking callback method
This commit is contained in:
parent
3435ee0604
commit
ed17281f0d
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue