Java Reference
In-Depth Information
negotiation server. The class diagram in Figure 20.9 presents the server-side
classes in the top part and the client-side classes in the bottom part.
On the server side the class
Server
is the access point, it offers a remote
interface (
ServerInterface
) through which it is possible to register a service
provider and to start a negotiation on behalf of a service client. The negotia-
tion is managed by a
MediationAgent
that interacts with
NegotiationAgents
that encapsulate the classes
Mediator
and
Negotiator
respectively; they
extend the MMI class
DActivity
. Thus they can communicate using the MMI
framework.
The service provider and client share a common structure that is made up
of a
Host
that extends the MMI class
DProcess
and a
Proxy
that extends the
MMI class
DActivity
. The
Proxy
is a remotely accessible object that can receive
events from the
NegotiationAgent
with information about the progress of the
negotiation.
Decision point
How to distribute the responsibilities?
We keep the preferences and the resource state on the service provider
side. This choice avoids data duplication and allows to access to up-to-date
data. Another advantage is that we keep the negotiation server as simple as
possible: it need not know about limited resources and reservations.
A negative effect of this choice is heavy traffic between the negotiation
server and the service provider server to access all the preference settings.
MediationAgent
Server
1
1
client
DActivity
provider
1
ServerInterface
DProcess
NegotiationAgent
1
*
notify
Host
Proxy
1
*
1
preference
ResourceProxy
Node boundary
Preference
Figure 20.9
Structure of the distributed agents