/** * Generate added events for the current goals */ public List<IMonitoringEvent> getCurrentStateEvents() { List<IMonitoringEvent> events = new ArrayList<IMonitoringEvent>(); getCurrentStateEvents(getInternalAccess(), state, getAgent(), events); return events; }
scope = bdiint.getAgent();
Object cs = getState().getAttributeValue(getInterpreter().getAgent(), OAVBDIRuntimeModel.agent_has_state); if(OAVBDIRuntimeModel.AGENTLIFECYCLESTATE_ALIVE.equals(cs))
/** * The prefix is the name of the capability starting from the agent. */ public String findServicePrefix(Object scope) { List path = new ArrayList(); findSubcapability(getAgent(), scope, path); String prefix = ""; for(int i=0; i<path.size(); i++) { prefix += getState().getAttributeValue(path.get(i), OAVBDIRuntimeModel.capabilityreference_has_name)+ "."; } return prefix; }
/** * Get the configuration. * @return The configuration. */ public String getConfiguration() { return (String)getState().getAttributeValue(getAgent(), OAVBDIRuntimeModel.capability_has_configuration); }
if(interpreter.findSubcapability(interpreter.getAgent(), scope, path))
public void run() { Object cs = getState().getAttributeValue(getInterpreter().getAgent(), OAVBDIRuntimeModel.agent_has_state); if(OAVBDIRuntimeModel.AGENTLIFECYCLESTATE_ALIVE.equals(cs)) { object = getInterpreter().killComponent(); } else { object = new Future(new RuntimeException("Component not running: "+getComponentIdentifier().getName())); } } };
if(interpreter.findSubcapability(interpreter.getAgent(), scope, path))
if(interpreter.findSubcapability(interpreter.getAgent(), scope, path))
public void run() { Object cs = getState().getAttributeValue(getInterpreter().getAgent(), OAVBDIRuntimeModel.agent_has_state); if(OAVBDIRuntimeModel.AGENTLIFECYCLESTATE_ALIVE.equals(cs)) { getInterpreter().killComponent().addResultListener(new DelegationResultListener(ret)); } else { ret.setException(new RuntimeException("Component not running: "+getComponentIdentifier().getName())); } } });
Object magent = state.getAttributeValue(ip.getAgent(), OAVBDIRuntimeModel.element_has_model); Collection mbelsets = state.getAttributeValues(magent, OAVBDIMetaModel.capability_has_beliefsets); Object[] tmp = AgentRules.resolveCapability(ref, OAVBDIRuntimeModel.beliefset_type, ip.getAgent(), state); if(belname.equals(tmp[0]) && scope.equals(tmp[1]))
Object magent = state.getAttributeValue(ip.getAgent(), OAVBDIRuntimeModel.element_has_model); Collection mbels = state.getAttributeValues(magent, OAVBDIMetaModel.capability_has_beliefs); Object[] tmp = AgentRules.resolveCapability(ref, OAVBDIRuntimeModel.belief_type, ip.getAgent(), state); if(belname.equals(tmp[0]) && scope.equals(tmp[1]))
Object cs = getState().getAttributeValue(getInterpreter().getAgent(), OAVBDIRuntimeModel.agent_has_state); if(OAVBDIRuntimeModel.AGENTLIFECYCLESTATE_ALIVE.equals(cs))
if(!getHandle().equals(getInterpreter().getAgent())) throw new RuntimeException("Set result only allowed in agent, not in capabilities.");
Object agent = BDIInterpreter.getInterpreter(state).getAgent(); Map parents = (Map)state.getAttributeValue(agent, OAVBDIRuntimeModel.agent_has_initparents); Map arguments = (Map)state.getAttributeValue(agent, OAVBDIRuntimeModel.agent_has_arguments);
Object agent = BDIInterpreter.getInterpreter(state).getAgent(); Map parents = (Map)state.getAttributeValue(agent, OAVBDIRuntimeModel.agent_has_initparents); Map arguments = (Map)state.getAttributeValue(agent, OAVBDIRuntimeModel.agent_has_arguments);