/** * Notify the listener. */ public void notifyListener(IResultListener<Void> notify) { notify.resultAvailable(null); }
public void run() { listener.exceptionOccurred(e); } });
/** * Add a new listener to get notified when the goal is finished. * @param listener The listener. */ public void addListener(IResultListener<Object> listener) { if(listeners==null) listeners = new ArrayList<IResultListener<Object>>(); if(isSucceeded()) { listener.resultAvailable(null); } else if(isFailed()) { listener.exceptionOccurred(exception); } else { listeners.add(listener); } }
/** * Add a new listener to get notified when the goal is finished. * @param listener The listener. */ public void addListener(IResultListener<Void> listener) { if(listeners==null) listeners = new ArrayList<IResultListener<Void>>(); if(isSucceeded()) { listener.resultAvailable(null); } else if(isFailed()) { listener.exceptionOccurred(exception); } else { listeners.add(listener); } }
if(entry.exception==null) entry.listener.resultAvailable(entry.result); entry.listener.exceptionOccurred(entry.exception);
/** * Send a backward command. */ public void sendBackwardCommand(Object info, IResultListener<Void> com) { com.resultAvailable(null); }
public void run() { listener.exceptionOccurred(e); } });
protected void internalNotifyListener(final IResultListener<Void> lis) { if(adapter.isExternalThread()) { try { ea.scheduleStep(new IComponentStep<Void>() { public IFuture<Void> execute(IInternalAccess ia) { lis.resultAvailable(null); return IFuture.DONE; } }); } catch(ComponentTerminatedException e) { lis.exceptionOccurred(e); } } else { lis.resultAvailable(null); } }
/** * Pull an intermediate result. */ public void pullIntermediateResult(IResultListener<Void> notify) { notify.resultAvailable(null); }
public void exceptionOccurred(Exception exception) { lis.exceptionOccurred(exception); } }));
/** * Add a new listener. */ public void addListener(IResultListener<Void> listener) { if(listeners==null) listeners = new ArrayList<IResultListener<Void>>(); if(isSucceeded()) { listener.resultAvailable(null); } else if(isFailed()) { listener.exceptionOccurred(exception); } else { listeners.add(listener); } }
public void resultAvailable(Void result) { lis.resultAvailable(null); }
public void exceptionOccurred(Exception exception) { lis.exceptionOccurred(exception); } }));
notify.exceptionOccurred(e); notify.resultAvailable(null);
/** * Terminate the future. */ public void terminate(Exception reason, IResultListener<Void> terminate) { terminate.resultAvailable(null); }
/** * */ protected void notifyException(Exception exception) { if(!isFinished()) { finished = true; if(listener!=null) { listener.exceptionOccurred(exception); } else { scorelistener.exceptionOccurred(exception); } } } }
delegate.exceptionOccurred(exception); delegate.resultAvailable(results);
/** * Send a foward command. */ public void sendForwardCommand(Object info, IResultListener<Void> com) { com.resultAvailable(null); }
/** * */ protected void notifyException(Exception exception) { if(!isFinished()) { finished = true; if(listener!=null) { listener.exceptionOccurred(exception); } else { scorelistener.exceptionOccurred(exception); } } } }
lis.exceptionOccurred(fut.exception); lis.resultAvailable(fut.result);