Class BuyBookService
- java.lang.Object
- 
- jadex.bdi.examples.booktrading.seller.BuyBookService
 
- 
- All Implemented Interfaces:
- IBuyBookService
 
 public class BuyBookService extends java.lang.Object implements IBuyBookService Implementation of the buy book service.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IBDIXAgentFeatureagentThe agent.
 - 
Constructor SummaryConstructors Constructor Description BuyBookService()
 - 
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 bookIFuture<java.lang.Integer>callForProposal(java.lang.String title)Ask the seller for a a quote on a book.
 
- 
- 
- 
Field Detail- 
agentprotected IBDIXAgentFeature agent The agent.
 
- 
 - 
Method Detail- 
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.
 
 
- 
 
-