Java Reference
In-Depth Information
client :
BasicNegotiator
clientPref :
PreferenceMap
provider :
BasicNegotiator
mediator :
Mediator
initialProposal()
bestProposal()
initialProposal()
bestProposal()
intersect()
intersect()
counterProposal()
rank()
evaluate()
counterProposal()
rank()
evaluate()
Figure 20.6
Behaviour of the mediator
public void
addValue(String name, Value value){
AttributeSpec attribute
#
(AttributeSpec)
attributes.get(name);
attribute.addValue(value);
}
public
AttributeSpec attribute(String name){
return
(AttributeSpec)attributes.get(name);
}
public
Collection attributes(){
return
attributes.values();
}
public
String toString(){
StringBuffer buffer
#
new
StringBuffer();
Iterator it
#
attributes.values().iterator();