public class SellerBDI extends java.lang.Object implements IBuyBookService, INegotiationAgent
Modifier and Type | Class and Description |
---|---|
class |
SellerBDI.ExecuteTask |
class |
SellerBDI.MakeProposal |
class |
SellerBDI.SellBook |
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.IInternalAccess |
agent |
protected Gui |
gui |
protected java.util.List<NegotiationReport> |
reports |
Constructor and Description |
---|
SellerBDI() |
Modifier and Type | Method and Description |
---|---|
jadex.commons.future.IFuture<java.lang.Void> |
acceptProposal(java.lang.String title,
int price)
Buy a book
|
void |
body()
The agent body.
|
jadex.commons.future.IFuture<java.lang.Integer> |
callForProposal(java.lang.String title)
Ask the seller for a a quote on a book.
|
void |
createGoal(Order order)
Create a purchase or sell oder.
|
protected void |
executeTask(SellerBDI.ExecuteTask goal) |
jadex.bridge.IInternalAccess |
getAgent()
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 long |
getTime()
Get the current time.
|
protected void |
makeProposal(SellerBDI.MakeProposal goal) |
void |
shutdown()
Called when agent terminates.
|
protected jadex.bridge.IInternalAccess agent
protected java.util.List<NegotiationReport> reports
protected Gui gui
public void body()
public void shutdown()
public java.util.List<Order> getOrders()
INegotiationAgent
getOrders
in interface INegotiationAgent
public java.util.List<Order> getOrders(java.lang.String title)
protected void makeProposal(SellerBDI.MakeProposal goal)
protected void executeTask(SellerBDI.ExecuteTask goal)
protected long getTime()
public jadex.commons.future.IFuture<java.lang.Integer> callForProposal(java.lang.String title)
callForProposal
in interface IBuyBookService
title
- The book title.public jadex.commons.future.IFuture<java.lang.Void> acceptProposal(java.lang.String title, int price)
acceptProposal
in interface IBuyBookService
title
- The book title.price
- The price to pay.public jadex.bridge.IInternalAccess getAgent()
getAgent
in interface INegotiationAgent
public void createGoal(Order order)
createGoal
in interface INegotiationAgent
public java.util.Collection<INegotiationGoal> getGoals()
getGoals
in interface INegotiationAgent
public java.util.List<NegotiationReport> getReports(Order order)
getReports
in interface INegotiationAgent