jadex.bdi.planlib.protocols.subscribe.SPHandleUpdatePlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-applib-bdi Show documentation
Show all versions of jadex-applications-applib-bdi Show documentation
The Jadex applib BDI package contains ready to use functionalities for BDI agents mostly in form of modules called capabilities.
The newest version!
package jadex.bdi.planlib.protocols.subscribe;
import jadex.bdiv3.runtime.IGoal;
import jadex.bdiv3x.runtime.IMessageEvent;
import jadex.bdiv3x.runtime.Plan;
import jadex.bridge.fipa.SFipa;
public class SPHandleUpdatePlan extends Plan
{
public void body()
{
IMessageEvent updateMsg = (IMessageEvent) getReason();
IGoal handleUpdate = createGoal("sp_handle_update");
handleUpdate.getParameter("subscription_id").setValue(updateMsg.getParameter(SFipa.CONVERSATION_ID).getValue());
handleUpdate.getParameter("update").setValue(updateMsg.getParameter(SFipa.CONTENT).getValue());
dispatchTopLevelGoal(handleUpdate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy