| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Trader
Interface to be implmented by TraderImplementation. CS 537, Spring 2007, Project 2.
| Method Summary | |
|---|---|
|  void | deliver(int amt)Accepts a delivery from the supplier. | 
|  void | get(Order order)A request from a brewer. | 
|  Order | getAmountOnHand()Reports on the total amount of resources held by this Trader. | 
|  void | swap(Grain what,
     int amt)Responds to a swap request from another Trader. | 
| Method Detail | 
|---|
Order getAmountOnHand()
void get(Order order)
         throws InterruptedException
order - the number of bushels needed of each type of grain.
InterruptedException - if the current thread is interrupted while
            waiting for the order to be filled.
void swap(Grain what,
          int amt)
          throws InterruptedException
what - the type of grain the other Trader wants to swap.amt - the number of bushels to swap.
InterruptedException - if the current thread is interrupted while
            waiting for the swap to succeed.void deliver(int amt)
amt - the number of ounces of this Trader's specialty
               being delivered.| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||