public void intermediateResultAvailable(DiscoveryInfo dis) { // Found a new platform -> search registry service and subscribe final IComponentIdentifier cid = dis.getComponentIdentifier(); newPlatformFound(cid); }
/** * Get the string representation. */ public String toString() { return "DiscoveryInfo(cid=" + cid + ", proxy=" + proxy + ", time=" + getTimeDelays() + ")"; } }
public void exceptionOccurred(Exception exception) { dif.setProxy(null); informListeners(dif); } });
di.removeTimeDelay(awamech); dif = new DiscoveryInfo(sender, null, remoteexcluded, info.getProperties()); dif.setTimeDelay(awamech, getClockTime(), info.getDelay()); discovered.put(sender, dif); informListeners(dif); changedaddrs = !SUtil.arrayEquals(dif.getComponentIdentifier().getAddresses(), sender.getAddresses()); dif.setComponentIdentifier(sender); dif.setTimeDelay(awamech, getClockTime(), info.getDelay()); informListeners(dif); if(dif.getDelay(null)!=-1) if(info.getDelay()==-1 || getClockTime()+info.getDelay()>dif.getTime()+dif.getDelay()) dif.setTimeDelay(null, getClockTime(), info.getDelay()); informListeners(dif); dif.setTimeDelay(null, getClockTime(), info.getDelay()); dif.setRemoteExcluded(remoteexcluded); && !remoteexcluded && isAutoCreateProxy() && dif.getProxy()==null) else if(changedaddrs && dif.getProxy()!=null) final IComponentIdentifier remote = dif.getComponentIdentifier();
if(dif==null) dif = new DiscoveryInfo(sender, null, getClockTime(), info.getDelay(), remoteexcluded); discovered.put(sender, dif); informListeners(dif); dif.setComponentIdentifier(sender); dif.setTime(getClockTime()); dif.setDelay(info.getDelay()); dif.setRemoteExcluded(remoteexcluded); && !remoteexcluded && isAutoCreateProxy() && dif.getProxy()==null) else if(dif.getProxy()!=null) final IComponentIdentifier remote = dif.getComponentIdentifier(); dif.getProxy().addResultListener(new IResultListener<IComponentIdentifier>()
if(column == 0) value = dif.getComponentIdentifier(); value = ""+dif.getProperties(); Map<String, long[]> tds = dif.getTimeDelays(); for(String key: tds.keySet()) value = dif.getProxy()!=null && dif.getProxy().isDone() && dif.getProxy().getException()==null ? Boolean.TRUE : Boolean.FALSE; value = dif.isRemoteExcluded() ? Boolean.TRUE : Boolean.FALSE;
args.put("component", dif.getComponentIdentifier()); dif.setProxy(ret); ret.addResultListener(new IResultListener<IComponentIdentifier>() if(dif.getComponentIdentifier().equals(root))
public void resultAvailable(Object result) { // Only need to check, when proxy already created if(dif.getProxy()!=null && dif.getProxy().isDone() && dif.getProxy().getException()==null) { IComponentIdentifier proxy = dif.getProxy().get(null); IComponentManagementService cms = (IComponentManagementService)result; cms.getComponentDescription(proxy) .addResultListener(new IResultListener<IComponentDescription>() { public void resultAvailable(IComponentDescription result) { } public void exceptionOccurred(Exception exception) { dif.setProxy(null); informListeners(dif); } }); } } public void exceptionOccurred(Exception exception)
/** * Get the time. * @return the time. */ public long getTime() { return getMaxEntry()[0]; } //
di.removeTimeDelay(awamech); dif = new DiscoveryInfo(sender, null, remoteexcluded, info.getProperties()); dif.setTimeDelay(awamech, getClockTime(), info.getDelay()); discovered.put(sender, dif); informListeners(dif); changedaddrs = !SUtil.arrayEquals(dif.getComponentIdentifier().getAddresses(), sender.getAddresses()); dif.setComponentIdentifier(sender); dif.setTimeDelay(awamech, getClockTime(), info.getDelay()); informListeners(dif); if(dif.getDelay(null)!=-1) if(info.getDelay()==-1 || getClockTime()+info.getDelay()>dif.getTime()+dif.getDelay()) dif.setTimeDelay(null, getClockTime(), info.getDelay()); informListeners(dif); dif.setTimeDelay(null, getClockTime(), info.getDelay()); dif.setRemoteExcluded(remoteexcluded); && !remoteexcluded && isAutoCreateProxy() && dif.getProxy()==null) else if(changedaddrs && dif.getProxy()!=null) final ITransportComponentIdentifier remote = dif.getComponentIdentifier();
if(column == 0) value = dif.getComponentIdentifier(); value = ""+dif.getProperties(); Map<String, long[]> tds = dif.getTimeDelays(); for(String key: tds.keySet()) value = dif.getProxy()!=null && dif.getProxy().isDone() && dif.getProxy().getException()==null ? Boolean.TRUE : Boolean.FALSE; value = dif.isRemoteExcluded() ? Boolean.TRUE : Boolean.FALSE;
args.put("component", dif.getComponentIdentifier()); dif.setProxy(ret); ret.addResultListener(new IResultListener<IComponentIdentifier>()
/** * Check if local proxy is still available. * @param dif The discovery info. */ public void checkProxy(final DiscoveryInfo dif) { // Only need to check, when proxy already created if(dif.getProxy()!=null && dif.getProxy().isDone() && dif.getProxy().getException()==null) { IComponentIdentifier proxy = dif.getProxy().get(); cms.getComponentDescription(proxy) .addResultListener(new IResultListener<IComponentDescription>() { public void resultAvailable(IComponentDescription result) { } public void exceptionOccurred(Exception exception) { dif.setProxy(null); informListeners(dif); } }); } }
/** * Get the time. * @return the time. */ public long getDelay() { return getMaxEntry()[1]; }
args.put("component", dif.getComponentIdentifier()); dif.setProxy(ret); ret.addResultListener(new IResultListener<IComponentIdentifier>() if(dif.getComponentIdentifier().equals(root)) cms.createComponent(dif.getComponentIdentifier().getLocalName(), "jadex/platform/service/remote/ProxyAgent.class", ci, agent.getComponentFeature(IExecutionFeature.class).createResultListener(new DefaultResultListener<Collection<Tuple2<String, Object>>>(agent.getLogger())
/** * Check if local proxy is still available. * @param dif The discovery info. */ public void checkProxy(final DiscoveryInfo dif) { // Only need to check, when proxy already created if(dif.getProxy()!=null && dif.getProxy().isDone() && dif.getProxy().getException()==null) { IComponentIdentifier proxy = dif.getProxy().get(null); cms.getComponentDescription(proxy) .addResultListener(new IResultListener<IComponentDescription>() { public void resultAvailable(IComponentDescription result) { } public void exceptionOccurred(Exception exception) { dif.setProxy(null); informListeners(dif); } }); } }
public void customResultAvailable(final IComponentManagementService cms) if(dif.getComponentIdentifier().equals(root))