All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdi.runtime.impl.IInternalBDIAgentFeature Maven / Gradle / Ivy

The newest version!
package jadex.bdi.runtime.impl;

import java.beans.PropertyChangeEvent;
import java.util.Map;

import jadex.bdi.model.IBDIModel;
import jadex.bdi.runtime.IBDIAgentFeature;
import jadex.bdi.runtime.IBeliefListener;
import jadex.common.IResultCommand;
import jadex.execution.IExecutionFeature;
import jadex.future.IFuture;
import jadex.rules.eca.EventType;
import jadex.rules.eca.RuleSystem;

/**
 *  Methods internally called on the BDI agent feature. 
 */
public interface IInternalBDIAgentFeature	extends IBDIAgentFeature
{
	public static IInternalBDIAgentFeature	get()
	{
		return (IInternalBDIAgentFeature)IExecutionFeature.get().getComponent().getFeature(IBDIAgentFeature.class);
	}
	
	public void	init();
	public void	terminate();
	
//	/**
//	 *  Get the inited.
//	 *  @return The inited.
//	 */
//	public boolean isInited();

	/**
	 *  Get the BDI model.
	 *  @return the BDI model.
	 */
	public IBDIModel getBDIModel();

	/**
	 *  Get the runtime state.
	 *  @return the capability.
	 */
	public RCapability getCapability();
	
	/**
	 *  Get the rulesystem.
	 *  @return The rulesystem.
	 */
	public RuleSystem getRuleSystem();

	/**
	 *  Get the event adders map.
	 *  @return The event adders.
	 */
	public Map, PropertyChangeEvent>> getEventAdders();
	
//	/**
//	 *  Get parameter values for injection into method and constructor calls.
//	 */
//	public Object[] getInjectionValues(Class[] ptypes, Annotation[][] anns, MElement melement, ChangeEvent event, RPlan rplan, RProcessableElement rpe);
//	
//	// todo: support parameter names via annotation in guesser (guesser with meta information)
//	/**
//	 *  Get parameter values for injection into method and constructor calls.
//	 *  @return A valid assigment or null if no assignment could be found.
//	 */
//	public Object[]	getInjectionValues(Class[] ptypes, Annotation[][] anns, MElement melement, ChangeEvent event, RPlan rplan, RProcessableElement rpe, Collection vs);

	/**
	 *  Get a capability pojo object.
	 *  @return The capability pojo.
	 */
	public Object	getCapabilityObject(String name);
	
	/**
	 *  Add a belief listener.
	 *  @param name The belief name.
	 *  @param listener The belief listener.
	 */
	public void addBeliefListener(String name, IBeliefListener listener);
	
	/**
	 *  Remove a belief listener.
	 *  @param name The belief name.
	 *  @param listener The belief listener.
	 */
	public void removeBeliefListener(String name, IBeliefListener listener);
	
	/**
	 *  Get the class loader for the pojo agent.
	 */
	public ClassLoader getClassLoader();
	
	/**
	 *  Check, if the agent is a pure BDI agent, i.e. without class generation.
	 */
	public boolean isPure();
}