Class SellerAgent
- java.lang.Object
- 
- jadex.bdiv3.examples.booktrading.seller.SellerAgent
 
- 
- All Implemented Interfaces:
- IBuyBookService,- INegotiationAgent
 
 public class SellerAgent extends java.lang.Object implements IBuyBookService, INegotiationAgent 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classSellerAgent.ExecuteTaskclassSellerAgent.MakeProposalclassSellerAgent.SellBook
 - 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentprotected Future<Gui>guiprotected java.util.List<NegotiationReport>reports
 - 
Constructor SummaryConstructors Constructor Description SellerAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>acceptProposal(java.lang.String title, int price)Buy a bookvoidbody()The agent body.IFuture<java.lang.Integer>callForProposal(java.lang.String title)Ask the seller for a a quote on a book.voidcreateGoal(Order order)Create a purchase or sell oder.protected voidexecuteTask(SellerAgent.ExecuteTask goal)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<Order>getOrders(java.lang.String title)java.util.List<NegotiationReport>getReports(Order order)Get all reports.protected longgetTime()Get the current time.protected voidmakeProposal(SellerAgent.MakeProposal 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
 
 - 
getOrderspublic java.util.List<Order> getOrders(java.lang.String title) 
 - 
makeProposalprotected void makeProposal(SellerAgent.MakeProposal goal) 
 - 
executeTaskprotected void executeTask(SellerAgent.ExecuteTask goal) 
 - 
getTimeprotected long getTime() Get the current time.
 - 
callForProposalpublic IFuture<java.lang.Integer> callForProposal(java.lang.String title) Ask the seller for a a quote on a book.- Specified by:
- callForProposalin interface- IBuyBookService
- Parameters:
- title- The book title.
- Returns:
- The price.
 
 - 
acceptProposalpublic IFuture<java.lang.Void> acceptProposal(java.lang.String title, int price) Buy a book- Specified by:
- acceptProposalin interface- IBuyBookService
- Parameters:
- title- The book title.
- price- The price to pay.
- Returns:
- A future indicating if the transaction was successful.
 
 - 
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
 
 
- 
 
-