Class BuyerAgent
- java.lang.Object
- 
- jadex.bdiv3.examples.booktrading.buyer.BuyerAgent
 
- 
- All Implemented Interfaces:
- INegotiationAgent
 
 public class BuyerAgent extends java.lang.Object implements INegotiationAgent 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classBuyerAgent.PurchaseBook
 - 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentprotected Future<Gui>guiprotected java.util.List<NegotiationReport>reports
 - 
Constructor SummaryConstructors Constructor Description BuyerAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbody()The agent body.voidcreateGoal(Order order)Create a purchase or sell oder.protected voidgenerateNegotiationReport(Order order, Tuple2<IBuyBookService,java.lang.Integer>[] proposals, double acceptable_price)Generate and add a negotiation report.IInternalAccessgetAgent()Get the agent.java.util.Collection<INegotiationGoal>getGoals()Get all purchase or sell goals.java.util.List<Order>getOrders()Get all orders.java.util.List<NegotiationReport>getReports(Order order)Get all reports.protected longgetTime()Get the current time.protected voidpurchaseBook(BuyerAgent.PurchaseBook goal)voidshutdown()Called when agent terminates.
 
- 
- 
- 
Field Detail- 
agentprotected IInternalAccess agent 
 - 
reportsprotected java.util.List<NegotiationReport> reports 
 
- 
 - 
Method Detail- 
bodypublic void body() The agent body.
 - 
shutdownpublic void shutdown() Called when agent terminates.
 - 
getOrderspublic java.util.List<Order> getOrders() Description copied from interface:INegotiationAgentGet all orders.- Specified by:
- getOrdersin interface- INegotiationAgent
 
 - 
getTimeprotected long getTime() Get the current time.
 - 
purchaseBookprotected void purchaseBook(BuyerAgent.PurchaseBook goal) 
 - 
generateNegotiationReportprotected void generateNegotiationReport(Order order, Tuple2<IBuyBookService,java.lang.Integer>[] proposals, double acceptable_price) Generate and add a negotiation report.
 - 
getAgentpublic IInternalAccess getAgent() Get the agent.- Specified by:
- getAgentin interface- INegotiationAgent
- Returns:
- The agent.
 
 - 
createGoalpublic void createGoal(Order order) Create a purchase or sell oder.- Specified by:
- createGoalin interface- INegotiationAgent
 
 - 
getGoalspublic java.util.Collection<INegotiationGoal> getGoals() Get all purchase or sell goals.- Specified by:
- getGoalsin interface- INegotiationAgent
 
 - 
getReportspublic java.util.List<NegotiationReport> getReports(Order order) Get all reports.- Specified by:
- getReportsin interface- INegotiationAgent
 
 
- 
 
-