/** * Create a new future. */ public PullSubscriptionIntermediateDelegationFuture(IPullSubscriptionIntermediateFuture<?> src) { src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
public void customIntermediateResultAvailable(IService result) { super.customIntermediateResultAvailable(result); }
public void finished() { // System.out.println("search end fin: "+ret.hashCode() + " " + tried); // if (selector instanceof TypeResultSelector) // { // System.out.println(((TypeResultSelector) selector).getType()); // } opencalls.remove(ret); super.finished(); }
public void customResultAvailable(Collection<IService> result) { // System.out.println("search end: "+ret.hashCode()); opencalls.remove(ret); super.resultAvailable(result); }
public void exceptionOccurred(Exception exception) { // System.out.println("search end: "+ret.hashCode()); opencalls.remove(ret); // If the future was terminated it is changed to finished to avoid // getting exceptions outside as termination is used also internally // to cut off the search when enough results have been found. if(exception instanceof FutureTerminatedException && ret.getIntermediateResults().size()>0) { finished(); } else { super.exceptionOccurred(exception); } } });
public void customResultAvailable(Collection<IService> result) { System.out.println("search end: "+ret.hashCode()); opencalls.remove(ret); super.resultAvailable(result); }
public void exceptionOccurred(Exception exception) { // System.out.println("search end ex: "+ret.hashCode() + " " + tried); // if (selector instanceof TypeResultSelector) // { // if (((TypeResultSelector) selector).getType().getName().indexOf("IClockService") != -1) // { // Thread.dumpStack(); // } // System.out.println(((TypeResultSelector) selector).getType()); // } opencalls.remove(ret); // If the future was terminated it is changed to finished to avoid // getting exceptions outside as termination is used also internally // to cut off the search when enough results have been found. if(exception instanceof FutureTerminatedException && ret.getIntermediateResults().size()>0 && !tried) { tried = true; finished(); } else { super.exceptionOccurred(exception); } } });
/** * */ public DelegatingTerminableIntermediateDelegationFuture(ITerminableIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
public void finished() { opencalls.remove(ret); super.finished(); }
public void customIntermediateResultAvailable(IService result) { super.customIntermediateResultAvailable(result); }
/** * */ public DelegatingPullIntermediateDelegationFuture(IPullIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * */ public DelegatingSubscriptionIntermediateDelegationFuture(ISubscriptionIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * */ public DelegatingPullIntermediateDelegationFuture(IPullIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * */ public DelegatingTerminableIntermediateDelegationFuture(ITerminableIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * Create a new future. */ public PullIntermediateDelegationFuture(IPullIntermediateFuture<?> src) { src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * */ public DelegatingPullSubscriptionIntermediateDelegationFuture(IPullSubscriptionIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * */ public DelegatingSubscriptionIntermediateDelegationFuture(ISubscriptionIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * Create a new future. */ public TerminableIntermediateDelegationFuture(ITerminableIntermediateFuture<?> src) { src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
/** * */ public DelegatingPullSubscriptionIntermediateDelegationFuture(IPullSubscriptionIntermediateFuture<?> src, FutureFunctionality func) { if(func==null) throw new IllegalArgumentException("Func must not null."); this.func = func; src.addResultListener(new TerminableIntermediateDelegationResultListener(this, src)); }
public void execute(Object args) { ISubscriptionIntermediateFuture<Long> src = con.writeToOutputStream(os, component); TerminableIntermediateDelegationResultListener<Long> lis = new TerminableIntermediateDelegationResultListener<Long>(ret, src); src.addResultListener(lis); } };