|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cougaar.pizza.plugin.PizzaPreferences
Local accumulation of replies to invite, marking who has replied and the kinds
of pizza they want. Automatically updated by the RSVPRelaySource. Published
by the InvitePlugin so that the PlaceOrderPlugin knows to start.
This class works as an example of publishing a custom object on the Blackboard. Note that it implements UniqueObject (which extends Serializable) for easy identification and retrieval on the Blackboard, and so it can be sent in messages.
InvitePlugin,
PlaceOrderPlugin,
Serialized Form| Constructor Summary | |
PizzaPreferences(org.cougaar.core.util.UID uid)
|
|
| Method Summary | |
void |
addFriendToPizza(java.lang.String friend,
java.lang.String preference)
The given friend has replied, requesting the given pizza, so store their response. |
java.lang.String |
getFriendNames()
|
java.util.Set |
getFriends()
|
java.lang.String |
getFriendToPreference()
|
int |
getNumMeat()
|
int |
getNumVeg()
|
java.lang.String |
getPreferenceForFriend(java.lang.String friend)
What kind of pizza does the given friend want? |
java.lang.String |
getPreferenceValues()
|
org.cougaar.core.util.UID |
getUID()
|
void |
setUID(org.cougaar.core.util.UID uid)
|
java.lang.String |
toHTML(int type)
Print an HTML-friendly description of the object, for use in the HistoryServlet. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PizzaPreferences(org.cougaar.core.util.UID uid)
| Method Detail |
public org.cougaar.core.util.UID getUID()
getUID in interface org.cougaar.core.util.UniqueObjectpublic void setUID(org.cougaar.core.util.UID uid)
setUID in interface org.cougaar.core.util.UniqueObject
public void addFriendToPizza(java.lang.String friend,
java.lang.String preference)
friend - The agent name respondingpreference - The kind of meat they like (using a pizza Constant)public java.lang.String getPreferenceForFriend(java.lang.String friend)
friend - to look up
public java.util.Set getFriends()
public java.lang.String getFriendNames()
public java.lang.String getPreferenceValues()
public java.lang.String getFriendToPreference()
public int getNumMeat()
public int getNumVeg()
public java.lang.String toHTML(int type)
toHTML in interface HistoryServletFriendlytype - Not-used here, is the transaction type
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||