bdi4jade.core

## Interface BDIAgent

- All Known Implementing Classes:
    AbstractBDIAgent, MultipleCapabilityAgent, SingleCapabilityAgent

      public interface BDIAgent

  This interfaces represents a BDIAgent that has a current set of goals, which can be selected to become intentions, that is, to tried to be achieved by means of the selection and execution of plans. It has a behavior that runs the BDI-interpreter.
  Author:
    Ingrid Nunes

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addGoal(Capability dispatcher, Goal goal)` Adds a new goal to this agent to be achieved.
    `boolean` | `addGoal(Capability dispatcher, Goal goal, GoalListener goalListener)` Adds a new goal to this agent to be achieved and adds a listener to observe events related to this goal.
    `boolean` | `addGoal(Goal goal)` Adds a new goal to this agent to be achieved.
    `boolean` | `addGoal(Goal goal, GoalListener goalListener)` Adds a new goal to this agent to be achieved and adds a listener to observe events related to this goal.
    `void` | `addGoalListener(GoalListener goalListener)` Adds a listener to be notified when about goal events.
    `void` | `addSoftgoal(Softgoal softgoal)` Adds a new softgoal to this agent.
    `jade.lang.acl.ACLMessage` | `blockingReceive()`
    `jade.lang.acl.ACLMessage` | `blockingReceive(long millis)`
    `jade.lang.acl.ACLMessage` | `blockingReceive(jade.lang.acl.MessageTemplate pattern)`
    `jade.lang.acl.ACLMessage` | `blockingReceive(jade.lang.acl.MessageTemplate pattern, long millis)`
    `boolean` | `canHandle(jade.lang.acl.ACLMessage msg)` Checks if this agent is able to process the given message.
    `void` | `doActivate()`
    `void` | `doClone(jade.core.Location destination, java.lang.String newName)`
    `void` | `doDelete()`
    `void` | `doMove(jade.core.Location destination)`
    `void` | `doSuspend()`
    `void` | `doTimeOut(jade.core.Timer t)`
    `void` | `doWait()`
    `void` | `doWait(long millis)`
    `void` | `doWake()`
    `void` | `dropGoal(Goal goal)` Drops a given goal of this agent, which means setting it as no longer desired.
    `void` | `dropSoftoal(Softgoal softgoal)` Drops a given softgoal of this agent.
    `jade.core.AgentState` | `getAgentState()`
    `jade.core.AID` | `getAID()`
    `java.util.Collection<Capability>` | `getAllCapabilities()` Returns all capabilities that are part of this agent.
    `jade.core.AID` | `getAMS()`
    `AgentBeliefRevisionStrategy` | `getBeliefRevisionStrategy()` Returns the belief revision strategy of this agent.
    `java.util.Collection<Belief<?,?>>` | `getBeliefs()` Returns a collection of all beliefs from all capabilities of this agent.
    `java.util.Set<Capability>` | `getCapabilities()` Returns the capabilities of this agent.
    `jade.wrapper.AgentContainer` | `getContainerController()`
    `jade.content.ContentManager` | `getContentManager()`
    `int` | `getCurQueueSize()`
    `AgentDeliberationFunction` | `getDeliberationFunction()` Returns the deliberation function of this agent.
    `java.util.List<GoalListener>` | `getGoalListeners()` Returns all goal listeners.
    `java.util.Set<Goal>` | `getGoals()` Gets all goals of this agent.
    `java.lang.String` | `getHap()`
    `jade.core.ServiceHelper` | `getHelper(java.lang.String serviceName)`
    `java.util.Set<Intention>` | `getIntentions()` Returns all agent intentions, which are goals that this agent is committed to achieve.
    `java.lang.String` | `getLocalName()`
    `java.lang.String` | `getName()`
    `AgentOptionGenerationFunction` | `getOptionGenerationFunction()` Returns the option generation function of this agent.
    `AgentPlanSelectionStrategy` | `getPlanSelectionStrategy()` Returns the plan selection strategy of this agent.
    `int` | `getQueueSize()`
    `java.util.Set<Softgoal>` | `getSoftgoals()` Gets all softgoals of this agent.
    `boolean` | `hasGoal(Goal goal)` Checks if this agent has a given goal.
    `jade.core.Location` | `here()`
    `void` | `putBack(jade.lang.acl.ACLMessage msg)`
    `jade.lang.acl.ACLMessage` | `receive()`
    `jade.lang.acl.ACLMessage` | `receive(jade.lang.acl.MessageTemplate pattern)`
    `void` | `removeGoalListener(GoalListener goalListener)` Removes a goal listener, so it will not be notified about the goal events anymore.
    `void` | `restart()` Restarts the agent in case its reasoning cycle is in the blocked state.
    `void` | `send(jade.lang.acl.ACLMessage msg)`
    `void` | `setQueueSize(int newSize)`

- - ### Method Detail

    - #### addGoal

          boolean addGoal(Capability dispatcher,
                          Goal goal)

      Adds a new goal to this agent to be achieved.
      Parameters:
        `dispatcher` - the capability that dispatched this goal.
        `goal` - the goal to be achieved.
      Returns:
        true if the goal was added, false otherwise.

    - #### addGoal

          boolean addGoal(Capability dispatcher,
                          Goal goal,
                          GoalListener goalListener)

      Adds a new goal to this agent to be achieved and adds a listener to observe events related to this goal.
      Parameters:
        `dispatcher` - the Capability that dispatched this goal.
        `goal` - the goal to be achieved.
        `goalListener` - the listener to be notified about this goal events.
      Returns:
        true if the goal was added, false otherwise.

    - #### addGoal

          boolean addGoal(Goal goal)

      Adds a new goal to this agent to be achieved.
      Parameters:
        `goal` - the goal to be achieved.
      Returns:
        true if the goal was added, false otherwise.

    - #### addGoal

          boolean addGoal(Goal goal,
                          GoalListener goalListener)

      Adds a new goal to this agent to be achieved and adds a listener to observe events related to this goal.
      Parameters:
        `goal` - the goal to be achieved.
        `goalListener` - the listener to be notified.
      Returns:
        true if the goal was added, false otherwise.

    - #### addGoalListener

          void addGoalListener(GoalListener goalListener)

      Adds a listener to be notified when about goal events.
      Parameters:
        `goalListener` - the listener to be notified.

    - #### addSoftgoal

          void addSoftgoal(Softgoal softgoal)

      Adds a new softgoal to this agent.
      Parameters:
        `softgoal` - the softgoal to be pursued.

    - #### blockingReceive

          jade.lang.acl.ACLMessage blockingReceive()

      See Also:
        `Agent.blockingReceive()`

    - #### blockingReceive

          jade.lang.acl.ACLMessage blockingReceive(long millis)

      See Also:
        `Agent.blockingReceive(long)`

    - #### blockingReceive

          jade.lang.acl.ACLMessage blockingReceive(jade.lang.acl.MessageTemplate pattern)

      See Also:
        `Agent.blockingReceive(MessageTemplate)`

    - #### blockingReceive

          jade.lang.acl.ACLMessage blockingReceive(jade.lang.acl.MessageTemplate pattern,
                                                   long millis)

      See Also:
        `Agent.blockingReceive(MessageTemplate, long)`

    - #### canHandle

          boolean canHandle(jade.lang.acl.ACLMessage msg)

      Checks if this agent is able to process the given message.
      Parameters:
        `msg` - the message to be checked.
      Returns:
        true if this agent is able to handle the message.

    - #### doActivate

          void doActivate()

      See Also:
        `Agent.doActivate()`

    - #### doClone

          void doClone(jade.core.Location destination,
                       java.lang.String newName)

      See Also:
        `Agent.doClone(Location, String)`

    - #### doDelete

          void doDelete()

      See Also:
        `Agent.doDelete()`

    - #### doMove

          void doMove(jade.core.Location destination)

      See Also:
        `Agent.doMove(Location)`

    - #### doSuspend

          void doSuspend()

      See Also:
        `Agent.doSuspend()`

    - #### doTimeOut

          void doTimeOut(jade.core.Timer t)

      See Also:
        `Agent.doTimeOut(Timer)`

    - #### doWait

          void doWait()

      See Also:
        `Agent.doWait()`

    - #### doWait

          void doWait(long millis)

      See Also:
        `Agent.doWait(long)`

    - #### doWake

          void doWake()

      See Also:
        `Agent.doWake()`

    - #### dropGoal

          void dropGoal(Goal goal)

      Drops a given goal of this agent, which means setting it as no longer desired. If the goal is not part of the agent's current goals, no action is performed.
      Parameters:
        `goal` - the goal to be dropped.

    - #### dropSoftoal

          void dropSoftoal(Softgoal softgoal)

      Drops a given softgoal of this agent. If the softgoal is not part of the agent's current softgoals, no action is performed.
      Parameters:
        `softgoal` - the softgoal to be dropped.

    - #### getAgentState

          jade.core.AgentState getAgentState()

      See Also:
        `Agent.getAgentState()`

    - #### getAID

          jade.core.AID getAID()

      See Also:
        `Agent.getAID()`

    - #### getAllCapabilities

          java.util.Collection<Capability> getAllCapabilities()

      Returns all capabilities that are part of this agent. This included all capabilities composed or associated with other capabilities.
      Returns:
        the capabilities.

    - #### getAMS

          jade.core.AID getAMS()

      See Also:
        `Agent.getAMS()`

    - #### getBeliefRevisionStrategy

          AgentBeliefRevisionStrategy getBeliefRevisionStrategy()

      Returns the belief revision strategy of this agent.
      Returns:
        the beliefRevisionStrategy.

    - #### getBeliefs

          java.util.Collection<Belief<?,?>> getBeliefs()

      Returns a collection of all beliefs from all capabilities of this agent. It may have two equivalent beliefs, i.e. beliefs with the same name.
      Returns:
        the collection of all beliefs of this agent.

    - #### getCapabilities

          java.util.Set<Capability> getCapabilities()

      Returns the capabilities of this agent. It may be a single root capability or a set of capabilities.
      Returns:
        the set of capabilities of this agent.

    - #### getContainerController

          jade.wrapper.AgentContainer getContainerController()

      See Also:
        `Agent.getContainerController()`

    - #### getContentManager

          jade.content.ContentManager getContentManager()

      See Also:
        `Agent.getContentManager()`

    - #### getCurQueueSize

          int getCurQueueSize()

      See Also:
        `Agent.getCurQueueSize()`

    - #### getDeliberationFunction

          AgentDeliberationFunction getDeliberationFunction()

      Returns the deliberation function of this agent.
      Returns:
        the deliberationFunction

    - #### getGoalListeners

          java.util.List<GoalListener> getGoalListeners()

      Returns all goal listeners.
      Returns:
        the goalListeners.

    - #### getGoals

          java.util.Set<Goal> getGoals()

      Gets all goals of this agent. This goals are the ones in the goal set and the ones that are trying to be achieve in intentions.
      Returns:
        the set of goals.

    - #### getHap

          java.lang.String getHap()

      See Also:
        `Agent.getHap()`

    - #### getHelper

          jade.core.ServiceHelper getHelper(java.lang.String serviceName)
                                     throws jade.core.ServiceException

      Throws:
        `jade.core.ServiceException`
      See Also:
        `Agent.getHelper(String)`

    - #### getIntentions

          java.util.Set<Intention> getIntentions()

      Returns all agent intentions, which are goals that this agent is committed to achieve.
      Returns:
        the intentions.

    - #### getLocalName

          java.lang.String getLocalName()

      See Also:
        `Agent.getLocalName()`

    - #### getName

          java.lang.String getName()

      See Also:
        `Agent.getName()`

    - #### getOptionGenerationFunction

          AgentOptionGenerationFunction getOptionGenerationFunction()

      Returns the option generation function of this agent.
      Returns:
        the optionGenerationFunction

    - #### getPlanSelectionStrategy

          AgentPlanSelectionStrategy getPlanSelectionStrategy()

      Returns the plan selection strategy of this agent.
      Returns:
        the planSelectionStrategy

    - #### getQueueSize

          int getQueueSize()

      See Also:
        `Agent.getQueueSize()`

    - #### getSoftgoals

          java.util.Set<Softgoal> getSoftgoals()

      Gets all softgoals of this agent.
      Returns:
        the set of softgoals.

    - #### hasGoal

          boolean hasGoal(Goal goal)

      Checks if this agent has a given goal.
      Parameters:
        `goal` - the goal to be checked.
      Returns:
        true if this agent has the goal, false otherwise.

    - #### here

          jade.core.Location here()

      See Also:
        `Agent.here()`

    - #### putBack

          void putBack(jade.lang.acl.ACLMessage msg)

      See Also:
        `Agent.putBack(ACLMessage)`

    - #### receive

          jade.lang.acl.ACLMessage receive()

      See Also:
        `Agent.receive()`

    - #### receive

          jade.lang.acl.ACLMessage receive(jade.lang.acl.MessageTemplate pattern)

      See Also:
        `Agent.receive()`

    - #### removeGoalListener

          void removeGoalListener(GoalListener goalListener)

      Removes a goal listener, so it will not be notified about the goal events anymore.
      Parameters:
        `goalListener` - the goal listener to be removed.

    - #### restart

          void restart()

      Restarts the agent in case its reasoning cycle is in the blocked state.

    - #### send

          void send(jade.lang.acl.ACLMessage msg)

      See Also:
        `Agent.send(ACLMessage)`

    - #### setQueueSize

          void setQueueSize(int newSize)
                     throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`
      See Also:
        `Agent.setQueueSize(int)`