com.agentfactory.cldc.p2pmts
Class DualIDActuator

java.lang.Object
  extended by com.agentfactory.cldc.logic.Action
      extended by com.agentfactory.cldc.Actuator
          extended by com.agentfactory.cldc.p2pmts.DualIDActuator

public class DualIDActuator
extends Actuator

Adds an agent id to the address list of the agent. This actuator is used when both the standard message transport service and the the peer to peer message transport service are in operation. To indicate that the peer to peer message transport service is to be used, the functor of the first argument of the trigger must be p2p, otherwise the standard service will be used. The trigger for this actuator is addAgentID(?name,?addresses). The ?name variable is the name of the agent to be added. The ?addresses variable represents the address of the agent to be added.

Author:
Conor Muldoon

Constructor Summary
DualIDActuator(AffectManager manager)
          Creates an instance of AddAgentIDActuator.
 
Method Summary
 boolean act(FOS action)
          The act method is implemented by concrete classes of Action.
 
Methods inherited from class com.agentfactory.cldc.Actuator
adoptBelief, adoptBelief, register, retractBelief
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DualIDActuator

public DualIDActuator(AffectManager manager)
Creates an instance of AddAgentIDActuator.

Parameters:
manager - the affect manager of the agent.
Method Detail

act

public boolean act(FOS action)
Description copied from class: Action
The act method is implemented by concrete classes of Action. It provides the imperative functionality of the action.

Specified by:
act in class Action
Parameters:
action - the applied first order stucture, which matches with the identifier for the Actuator or Action.
Returns:
true if the action was successful, false otherwise.