return RemoteObjectInvocationHandler.newProxy(remoteObject,
factory, clazz);
} else if (name.equals("buildAsync")) {
@SuppressWarnings("rawtypes")
final Continuation cont = (Continuation) args[args.length - 1];
factory.create(clazz.getSimpleName(), props,
new DefaultContinuation<RemoteObject>(cont) {
@SuppressWarnings("unchecked")
@Override
public void onSuccess(RemoteObject remoteObject) {
try {
cont.onSuccess(RemoteObjectInvocationHandler
.newProxy(remoteObject, factory, clazz));
} catch (Exception e) {
log.warn(
"[Continuation] error invoking onSuccess implemented by client",
e);