public void exceptionOccurred(Exception exception) { // Todo: why future terminated exception thrown? if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } } }));
/** * Called when the result is available. * @param result The result. */ public void resultAvailable(Collection<E> result) { for(Iterator<E> it=result.iterator(); it.hasNext(); ) { intermediateResultAvailable(it.next()); } finished(); } }
public void intermediateResultAvailable(final ITimeService timeservice) { ISubscriptionIntermediateFuture<String> subscription = timeservice.subscribe(); subscription.addResultListener(new IntermediateDefaultResultListener<String>() { /** * This method gets called for each received time submission. */ public void intermediateResultAvailable(String time) { String platform = ((IService)timeservice).getServiceIdentifier().getProviderId().getPlatformName(); System.out.println("New time received from "+platform+" at "+timeservice.getLocation()+": "+time); } }); } });
subscription.addResultListener(new IntermediateDefaultResultListener<Event>()
public void exceptionOccurred(Exception exception) { // Ignore exception when monitored agent dies. if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } }
public void exceptionOccurred(Exception exception) { // Todo: why future terminated exception thrown? if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } } }));
public void exceptionOccurred(Exception exception) { // Todo: why future terminated exception thrown? if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } } }));
public void exceptionOccurred(Exception exception) { // Ignore exception when monitored agent dies. if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } }
public void exceptionOccurred(Exception exception) { // Todo: why future terminated exception thrown? if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } } }));
public void exceptionOccurred(Exception exception) { // Ignore exception when monitored agent dies. if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } }
public void exceptionOccurred(Exception exception) { // Todo: why future terminated exception thrown? if(!(exception instanceof FutureTerminatedException)) { super.exceptionOccurred(exception); } } }));
public void exceptionOccurred(Exception exception) { if (exceptionListener != null) { exceptionListener.exceptionOccurred(exception); } else { super.exceptionOccurred(exception); } } });