public static String getLoggerName(IComponentIdentifier cid) { // Prepend parent names for nested loggers. String name = null; for(; cid!=null; cid=cid.getParent()) { name = name==null ? cid.getLocalName() : cid.getLocalName() + "." +name; } return name; }
/** * Get the agent name. * @return The agent name. */ public String getAgentName() { return agent.getComponentIdentifier().getLocalName(); }
/** * Create a string representation. */ public String toString() { return cid==null? desc.getName().getLocalName(): desc.getName().getLocalName()+"("+cid+")"; }
/** * Get the agent name. * @return The agent name. */ public String getAgentName() { return getComponentIdentifier().getLocalName(); }
/** * Get the agent name. * @return The agent name. */ public String getComponentName() { return getComponentIdentifier().getLocalName(); }
/** * Get the agent name. * @return The agent name. */ public String getComponentName() { return getComponentIdentifier().getLocalName(); }
/** * Test if a call is remote. */ public boolean isRemoteCall() { return caller==null? false: !caller.getRoot().equals(platform) || (caller.getLocalName().equals("rms") && caller.getRoot().equals(platform)); // Hack? Shouldn't be caller be set to the remote component? }
/** * Receives a chat message. * @param sender The sender's name. * @param text The message text. */ public void message(final String sender, final String text) { System.out.println(agent.getComponentIdentifier().getLocalName()+" received at " +format.format(new Date(clock.getTime()))+" from: "+sender+" message: "+text); } }
/** * Load the settings. */ public IFuture<Void> loadSettings() { // Only load GUI settings as platform settings are loaded on platform startup and every tool init as required. return loadSettings(new File(jccaccess.getComponentIdentifier().getLocalName() + SETTINGS_EXTENSION)); }
/** * Load the settings. */ public IFuture<Void> loadSettings() { // Only load GUI settings as platform settings are loaded on platform startup and every tool init as required. return loadSettings(new File(jccaccess.getComponentIdentifier().getLocalName() + SETTINGS_EXTENSION)); }
/** * Get a string representation. */ public String toString() { return interpreter.getAgentAdapter().getComponentIdentifier().getLocalName() + ": " + action; } }
/** * Receives a chat message. * @param sender The sender's name. * @param text The message text. */ public void message(final String sender, final String text) { gui.addMessage(agent.getComponentIdentifier().getLocalName()+" received at " +format.format(new Date(clock.getTime()))+" from: "+sender+" message: "+text); }
/** * Get the name. */ // todo: remove. public String getName() { return getComponentAdapter().getComponentIdentifier().getLocalName(); }
/** * Get the agent name. * @return The agent name. */ public String getAgentName() { return getComponent().getComponentIdentifier().getLocalName(); }
public void run() { string = getInterpreter().getComponentIdentifier().getLocalName(); } };
/** * Create an external access. */ public ExternalAccess(StatelessAbstractInterpreter interpreter) { this.interpreter = interpreter; this.adapter = interpreter.getComponentAdapter(); this.tostring = interpreter.getComponentIdentifier().getLocalName(); this.provider = interpreter.getServiceContainer(); }
public void pullIntermediateResult() { Future<Object> res = new Future<Object>(); final String mycallid = SUtil.createUniqueId(compid.getLocalName()+"."+method.toString()); RemoteFuturePullCommand content = new RemoteFuturePullCommand(mycallid, callid); // Can be invoked directly, because internally redirects to agent thread. // System.out.println("sending terminate"); rsms.sendMessage(pr.getRemoteReference().getRemoteManagementServiceIdentifier(), null, content, mycallid, to, res, nonfunc, sic); }
public void pullIntermediateResult() { Future<Object> res = new Future<Object>(); final String mycallid = SUtil.createUniqueId(compid.getLocalName()+"."+method.toString()); RemoteFuturePullCommand content = new RemoteFuturePullCommand(mycallid, callid); // Can be invoked directly, because internally redirects to agent thread. // System.out.println("sending terminate"); rsms.sendMessage(pr.getRemoteReference().getRemoteManagementServiceIdentifier(), null, content, mycallid, to, res, nonfunc, sic); }
public void pullIntermediateResult() { Future<Object> res = new Future<Object>(); final String mycallid = SUtil.createUniqueId(compid.getLocalName()+"."+method.toString()); RemoteFuturePullCommand content = new RemoteFuturePullCommand(mycallid, callid); // Can be invoked directly, because internally redirects to agent thread. // System.out.println("sending terminate"); rsms.sendMessage(pr.getRemoteReference().getRemoteManagementServiceIdentifier(), null, content, mycallid, to, res, nonfunc, sic); }
public void execute(IOAVState state, IVariableAssignments assignments) { Object ragent = assignments.getVariableValue("?ragent"); Object rawmsg = assignments.getVariableValue("?rawmsg"); String agentname = BDIInterpreter.getInterpreter(state).getAgentAdapter().getComponentIdentifier().getLocalName(); BDIInterpreter.getInterpreter(state).getLogger(ragent).severe("Agent has received msg and has found no template: "+agentname+" "+rawmsg); state.removeAttributeValue(ragent, OAVBDIRuntimeModel.agent_has_inbox, rawmsg); } };