agentland.drug
Interface DrugLord
- All Known Implementing Classes:
- DrugLordAgent, DrugLordEHA
- public interface DrugLord
- extends Agent
requestHit
public Tuple requestHit(Vector tuples,
DrugRequest request)
throws RemoteException
- This is the most important part of our job. A dealer gives us a vector of
tuples of drugs that would might satisfy him, and a drug request object
that indicates the agentID of the addict and the general urgency that the
request is being made at. We do some parsing, think about everything for
a bit, and then pass back the tuple he can use (possibly null).
changeUrg
public void changeUrg(DrugRequest request,
Urgency urg)
throws RemoteException
- This lets dealers change the urgency with which they have requested some
tuple. They can raise or lower it to indicate a change in urgency, or
set it to Urgency.NONE to indicate they are done with their drug. Note
that the request passed in should be the _old_ request, with the urgency
not yet updated.
changeTupleSet
public void changeTupleSet(DrugRequest request,
Vector tuples)
throws RemoteException
- This lets dealers change the vector of tuples that might satisfy him.
He passes in the request he's changing, and the new vector of tuples.