/** * Get the value fetcher. * @return The value fetcher. */ public IValueFetcher getFetcher() { return new OAVBDIFetcher(state, initcapa!=null ? findSubcapability(initcapa) : ragent); }
public IInternalAccess getInternalAccess() { return BDIInterpreter.this.getInternalAccess(); } }; // parent of required service property?
/** * Create a component result listener. */ public <T> IResultListener<T> createResultListener(IResultListener<T> listener) { return interpreter.createResultListener(listener); }
/** * Execute the action. */ public void run() { // System.out.println("Timer occurred: "); to[0] = true; EventProcessingRules.schedulePlanInstanceCandidate(state, null, rplan, rcapa); BDIInterpreter.getInterpreter(state).getAgentAdapter().wakeup(); } }
/** * Create a new fetcher. */ public OAVBDIFetcher(IOAVState state, Object rcapa) { this.state = state; this.adapter = BDIInterpreter.getInterpreter(state).getAgentAdapter(); this.rcapa = rcapa; }
/** * Second init step of agent. */ protected IFuture init1() { // assert isAgentThread(); assert !getAgentAdapter().isExternalThread(); return AgentRules.initializeCapabilityInstance(state, ragent); }
/** * Start an atomic transaction. * All possible side-effects (i.e. triggered conditions) * of internal changes (e.g. belief changes) * will be delayed and evaluated after endAtomic() has been called. * @see #endAtomic() */ public void startAtomic() { interpreter.startMonitorConsequences(); interpreter.startAtomic(); }
/** * Get the service prefix. * @return The prefix for required services. */ public String getServicePrefix() { return findServicePrefix(initcapa!=null ? findSubcapability(initcapa) : ragent); }
/** * Get the logger. * @return The logger. */ public Logger getLogger() { return BDIInterpreter.getInterpreter(state).getLogger(rcapa); }
public void run() { object = AgentRules.evaluateExpression(getState(), getHandle(), new OAVBDIFetcher(getState(), getScope())); } };
/** * Create a new expression. * @param state The state. * @param scope The scope handle. */ public ExpressionNoModel(IOAVState state, Object scope, IParsedExpression expression) { this.state = state; this.scope = scope; this.expression = expression; this.interpreter = BDIInterpreter.getInterpreter(state); }
/** * Schedule a step of the component. * May safely be called from external threads. * @param step Code to be executed as a step of the component. * @return The result of the step. */ public <T> IFuture<T> scheduleStep(IComponentStep<T> step) { return scheduleStep(step, null); }
/** * Create an action to be executed in sync with the agent thread. */ public AgentInvocation() { interpreter.invokeSynchronized(this); }
/** * Fetch an element and its scope by its complex name (e.g. cmscap.cms_create_component). * @param name The name. * @param type The object type (belief, beliefset, goal, internalevent, messageevent). * @param rcapa The runtime scope. * @param forward resolve only forward (outer to inner). * @return An array [restname, scope]. */ public static Object[] resolveCapability(String name, OAVObjectType type, Object rcapa, IOAVState state) { return resolveCapability(name, type, rcapa, state, true); }
/** * Create the service container. * @return The service container. */ public IServiceContainer getServiceContainer() { // assert container!=null; if(container==null) container = createServiceContainer(); return container; }
/** * Get the clock. * @return The clock. */ public IClockService getClock() { return (IClockService)interpreter.getClockService(); }
/** * Fetch an element and its scope by its complex name (e.g. cmscap.cms_create_component). * @param name The name. * @param type The object type (belief, beliefset, goal, internalevent, messageevent). * @param rcapa The runtime scope. * @param forward resolve only forward (outer to inner). * @return An array [restname, scope]. */ public static Object[] resolveMCapability(String name, OAVObjectType type, Object mcapa, IOAVState state) { return resolveMCapability(name, type, mcapa, state, true, ""); }
/** * Get the internal access. * @return The internal access. */ public IInternalAccess getInternalAccess() { return getInternalAccess(null); }
/** * Create a component result listener. */ public <T> IIntermediateResultListener<T> createResultListener(IIntermediateResultListener<T> listener) { return interpreter.createResultListener(listener); }