public void run() { listener.exceptionOccurred(e); } });
public void run() { listener.exceptionOccurred(e); } });
public void exceptionOccurred(Exception exception) { lis.exceptionOccurred(exception); } }));
public void exceptionOccurred(Exception exception) { lis.exceptionOccurred(exception); } }));
/** * */ protected void notifyException(Exception exception) { if(!isFinished()) { finished = true; if(listener!=null) { listener.exceptionOccurred(exception); } else { scorelistener.exceptionOccurred(exception); } } } }
/** * */ protected void notifyException(Exception exception) { if(!isFinished()) { finished = true; if(listener!=null) { listener.exceptionOccurred(exception); } else { scorelistener.exceptionOccurred(exception); } } } }
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(Exception exception) { IResultListener<Object>[] alisteners = null; synchronized(this) { if(listeners!=null) { alisteners = (IResultListener<Object>[])listeners.toArray(new IResultListener[listeners.size()]); } } if(alisteners!=null) { for(int i=0; i<alisteners.length; i++) { alisteners[i].exceptionOccurred(exception); } } }
public void run() { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e); } else { listener.exceptionOccurred(e); } } });
public void run() { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e); } else { listener.exceptionOccurred(e); } } });
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(Exception exception) { IResultListener<Object>[] alisteners = null; synchronized(this) { if(listeners!=null) { alisteners = (IResultListener<Object>[])listeners.toArray(new IResultListener[listeners.size()]); } } if(alisteners!=null) { for(int i=0; i<alisteners.length; i++) { alisteners[i].exceptionOccurred(exception); } } }
public void run() { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e); } else { listener.exceptionOccurred(e); } } });
/** * Called when an exception occurred. * @param exception The exception. */ public void customExceptionOccurred(Exception exception) { if(undone && listener instanceof IUndoneResultListener<?>) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } }
public void run() { // try // { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } // } // catch(Exception e) // { // exception.printStackTrace(); // e.printStackTrace(); // } }
/** * 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); } }
/** * 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); } }
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); } }
/** * Notify the listeners. */ public void notifyListeners() { if(getListeners()!=null) { for(IResultListener<Void> lis: getListeners()) { if(isSucceeded()) { lis.resultAvailable(null); } else if(isFailed()) { lis.exceptionOccurred(exception); } } } }
/** * Notify the listeners. */ public void notifyListeners() { if(getListeners()!=null) { for(IResultListener<Void> lis: getListeners()) { if(isSucceeded()) { lis.resultAvailable(null); } else if(isFailed()) { lis.exceptionOccurred(exception); } } } }
/** * Notify the listeners. */ public void notifyListeners() { if(getListeners()!=null) { for(IResultListener<Object> lis: getListeners()) { if(isSucceeded()) { lis.resultAvailable(getResult()); } else if(isFailed()) { lis.exceptionOccurred(exception); } } } }