public class DefaultPlan extends AbstractPlan
Class.newInstance() method. A class that
has the Behaviour class as superclass is provides and it is
instantiates in the createPlanBody() method.Plan.EndState| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<? extends PlanBody> |
planBodyClass |
metadata| Constructor and Description |
|---|
DefaultPlan(java.lang.Class<? extends Goal> goalClass,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to achieve goals of the given
goal class, and its body should be instances of the provided plan body
class.
|
DefaultPlan(java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan.
|
DefaultPlan(GoalTemplate goalTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to achieve goals that match the
provided template.
|
DefaultPlan(GoalTemplate goalTemplate,
jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to achieve goals that match the
provided goal template and process messages that match the provided
message template.
|
DefaultPlan(jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to process messages that match
the provided message template.
|
DefaultPlan(java.lang.String id,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan.
|
DefaultPlan(java.lang.String id,
GoalTemplate goalTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to achieve goals that match the
provided template.
|
DefaultPlan(java.lang.String id,
GoalTemplate goalTemplate,
jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to achieve goals that match the
provided goal template and process messages that match the provided
message template.
|
DefaultPlan(java.lang.String id,
jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
Creates a new simple plan, which is able to process messages that match
the provided message template.
|
| Modifier and Type | Method and Description |
|---|---|
PlanBody |
createPlanBody()
Creates a new instance of the plan body.
|
java.lang.Class<? extends PlanBody> |
getPlanBodyClass()
Returns the class of plan body of this plan, to be instantiated and
executed.
|
addGoalTemplate, addMessageTemplate, canAchieve, canProcess, equals, getGoalTemplates, getId, getMessageTemplates, getPlanLibrary, hashCode, initGoalTemplates, initMessageTemplates, isContextApplicable, setPlanLibrary, toStringgetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadataclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadataprotected final java.lang.Class<? extends PlanBody> planBodyClass
public DefaultPlan(java.lang.Class<? extends Goal> goalClass, java.lang.Class<? extends PlanBody> planBodyClass)
goalClass - the class of goals that this plan is able to achieve.planBodyClass - the class of this plan body.public DefaultPlan(java.lang.Class<? extends PlanBody> planBodyClass)
planBodyClass - the class of this plan body.public DefaultPlan(GoalTemplate goalTemplate, java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initGoalTemplates() method or invoking the
AbstractPlan.addGoalTemplate(GoalTemplate) method.goalTemplate - the template of goals that this plan can achieve.planBodyClass - the class of this plan body.public DefaultPlan(GoalTemplate goalTemplate, jade.lang.acl.MessageTemplate messageTemplate, java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initGoalTemplates() method or invoking the
AbstractPlan.addGoalTemplate(GoalTemplate) method, while more message
templates can be specified by overriding the
AbstractPlan.initMessageTemplates() method or invoking the
AbstractPlan.addMessageTemplate(MessageTemplate) method.goalTemplate - the template of goals that this plan can achieve.messageTemplate - the template of messages that this plan can process.planBodyClass - the class of this plan body.public DefaultPlan(jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initMessageTemplates() method or invoking the
AbstractPlan.addMessageTemplate(MessageTemplate) method.messageTemplate - the template of messages that this plan can process.planBodyClass - the class of this plan body.public DefaultPlan(java.lang.String id,
java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initGoalTemplates() method or invoking the
AbstractPlan.addGoalTemplate(GoalTemplate) method, while more message
templates can be specified by overriding the
AbstractPlan.initMessageTemplates() method or invoking the
AbstractPlan.addMessageTemplate(MessageTemplate) method.id - the plan id.planBodyClass - the class of this plan body.public DefaultPlan(java.lang.String id,
GoalTemplate goalTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initGoalTemplates() method or invoking the
AbstractPlan.addGoalTemplate(GoalTemplate) method.id - the plan id.goalTemplate - the template of goals that this plan can achieve.planBodyClass - the class of this plan body.public DefaultPlan(java.lang.String id,
GoalTemplate goalTemplate,
jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initGoalTemplates() method or invoking the
AbstractPlan.addGoalTemplate(GoalTemplate) method, while more message
templates can be specified by overriding the
AbstractPlan.initMessageTemplates() method or invoking the
AbstractPlan.addMessageTemplate(MessageTemplate) method.id - the plan id.goalTemplate - the template of goals that this plan can achieve.messageTemplate - the template of messages that this plan can process.planBodyClass - the class of this plan body.public DefaultPlan(java.lang.String id,
jade.lang.acl.MessageTemplate messageTemplate,
java.lang.Class<? extends PlanBody> planBodyClass)
AbstractPlan.initMessageTemplates() method
or invoking the AbstractPlan.addMessageTemplate(MessageTemplate) method.id - the plan id.messageTemplate - the template of messages that this plan can process.planBodyClass - the class of this plan body.public PlanBody createPlanBody() throws PlanInstantiationException
PlanInstantiationException - if an error occurred during the instantiation process.Plan.createPlanBody()public java.lang.Class<? extends PlanBody> getPlanBodyClass()