/** * Get the root. * @return the root. */ public IComponentIdentifier getRoot() { if(root==null) this.root = agent.getComponentIdentifier().getRoot(); return root; }
/** * Get the agent name. * @return The agent name. */ public String getAgentName() { return agent.getComponentIdentifier().getLocalName(); }
/** * Get the information about this watchdog. * @return The information. */ public String getInfo() { return agent.getComponentIdentifier().getName(); }
/** * Test if a rid is local to this platform. */ protected boolean isLocal(IResourceIdentifier rid) { return rid.getLocalIdentifier()!=null && rid.getLocalIdentifier().getComponentIdentifier().equals(component.getComponentIdentifier().getRoot()); } }
/** * Get the "semi-qualified" sub name for settings. */ protected String getSubname() { String subname = null; IComponentIdentifier cid = agent.getComponentIdentifier(); while(cid.getParent()!=null) { subname = subname==null ? cid.getLocalName() : subname+"."+cid.getLocalName(); cid = cid.getParent(); } return subname; }
public void actionPerformed(ActionEvent e) { addSelectedAgent(new ComponentIdentifier("@"+access.getComponentIdentifier().getPlatformName(), (String[])null), list); } });
/** * */ public static IResourceIdentifier getLocalResourceIdentifier(IResourceIdentifier rid) { IResourceIdentifier ret = null; if(rid!=null && rid.getGlobalIdentifier()!=null && rid.getLocalIdentifier()!=null) { ret = new ResourceIdentifier(rid.getLocalIdentifier(), null); } return ret; }
/** * Init the transport. */ public LocalTransport(IInternalAccess component) { this.component = component; this.addresses = new String[]{SCHEMAS[0]+component.getComponentIdentifier().getPlatformName()}; }
/** * Test if a rid is local to this platform. * Test is performed by MAC address. * Root cid is only used as fallback. */ public static boolean isLocal(IResourceIdentifier rid, IComponentIdentifier root) { return rid!=null && rid.getLocalIdentifier()!=null && (SUtil.equals(rid.getLocalIdentifier().getHostIdentifier(), SUtil.getMacAddress()) || SUtil.equals(rid.getLocalIdentifier().getHostIdentifier(), root.getName())); }
/** * Create a new required service fetcher. */ public DefaultServiceFetcher(IServiceProvider provider, IInternalAccess ia, boolean realtime) { this.ia = ia; this.access = ia.getExternalAccess(); this.provider = provider; this.realtime = realtime; }
/** * Create an component termination exception. */ public ComponentTerminatedException(IComponentIdentifier cid) { super(cid.getName()); this.cid = cid; }
/** * Create a new cause as clone of the other. */ public Cause(Cause other) { this.origin = other.getOrigin(); this.sourceid = other.getSourceId(); // this.sourcename = other.getSourceName(); this.targetid = other.getTargetId(); // this.targetname = other.getTargetName(); }
/** * Set the properties of the next invocation. * @param timeout The timeout. * @param realtime The realtime flag. */ public static ServiceCall getOrCreateNextInvocation() { return getOrCreateNextInvocation(null); }
public IFuture<Void> execute(IInternalAccess ia) { avoidCallTimeouts(ret, ia, to, factor, realtime); return IFuture.DONE; } });
/** * Find a component factory for loading a specific component type. * @param type The component type. */ public ComponentFactorySelector(String type) { super(new FactoryFilter(type)); }
/** * Convenience method for creating a future (possibly with timeout avoidance). * @param timeouts (default is true) False, if no timeouts should be generated when service call timeout has elapsed. * @param ea The external access. */ public static <T> Future<?> getNoTimeoutFuture(Class<T> type, IExternalAccess ea) { return getFuture(type, false, ea); }
/** * Create the next cause. * @param targetname The new target name. */ public Cause createNext()//String targetname) { return new Cause(this, null);//targetname); }
/** * Called when the result is available. * @param result The result. */ public void resultAvailableIfUndone(Collection<E> result) { this.undone = true; resultAvailable(result); }
/** * Get the "semi-qualified" sub name for settings. */ protected String getSubname() { String subname = null; IComponentIdentifier cid = agent.getComponentIdentifier(); while(cid.getParent()!=null) { subname = subname==null ? cid.getLocalName() : subname+"."+cid.getLocalName(); cid = cid.getParent(); } return subname; }
/** * Create the agent. */ public InitExpressionsBDI() { this.name2 = agent.getComponentIdentifier().getName(); }