Skip to content

AbstractNegotationParty Methods

Taha Doğan Güneş edited this page Oct 24, 2017 · 1 revision
public class YourAgentsNameHere extends AbstractNegotiationParty {
   private final String description = "YourAgentsNameHere";
   
   @Override
   public void init(NegotiationInfo info) {
       super.init(info);
   }

   /**
    * When this function is called, it is expected that the Party chooses one of the actions from the possible
    * action list and returns an instance of the chosen action.
    *
    * @param list
    * @return
    */
   @Override
   public Action chooseAction(List<Class<? extends Action>> list) {
       // According to Stacked Alternating Offers Protocol list includes
       // Accept, Offer and EndNegotiation actions only.
   }

   /**
    * This method is called to inform the party that another NegotiationParty chose an Action.
    * @param sender
    * @param act
    */
   @Override
   public void receiveMessage(AgentID sender, Action act) {
       super.receiveMessage(sender, act);

 
   }

   /**
    * A human-readable description for this party.
    * @return
    */
   @Override
   public String getDescription() {
       return description;
   }
   
}
Clone this wiki locally