Java Reference
In-Depth Information
0 providerProposal 1
1
1
1
0 client
Proposal
Mediator
0 provider
Negotiator
1
1
1
0 clientProposal
1
BasicNegotiator
Figure 20.5 Negotiation structure
The negotiation process enacted by the mediator is illustrated by the
sequence diagram presented in Figure 20.6. There are two negotiators, the
client and the provider, each linked to the relative preferences. Initially the
mediator asks both negotiators to provide an initial proposal and to intersect
their own proposal with that from the counterpart. This phase ensures that
any following proposal will contain only values that are admissible for both
parties.
Then the mediator enters a loop where it first asks the client to formulate
a counter-proposal, this proposal is passed to the provider which formulates
a counter-proposal. The BasicNegotiator formulates the counter-proposal
using the preference object to rank the values of the proposal of the other
party. The strategy adopted by this class is the simplest one, which is pre-
sented in Section 20.2.1.
To ensure fairness only the negotiator has access to its own preferences
while the other negotiator and the mediator can only see the proposal
formulated.
The negotiation is terminated by the mediator either because an agree-
ment has been reached (i.e. both parties formulated the same proposal) or
because the maximum number of iterations have been completed.
20.4.3
Implementation
All the framework classes are part of a package named Negotiation . The class
Specification provides a definition of the negotiation constraints. It is con-
tains a collection of AttributesSpec objects that define the possible values for
each attribute.
package Negotiation;
import java.util.*;
public class Specification {
String name;
Map attributes # new Hashtable();
public void add(String name){
attributes.put(name, new AttributeSpec(name));
}
 
 
Search WWH ::




Custom Search