Trading Object Service
The Trading Service is analogous with a market trading context, in which agents make buy offers for items they want (bids), and sell offers for items that they have (asks), and the trading system is responsible for matching the bids and asks to execute trades. In the Trading Service, objects describe the services that they can offer to the system, and clients issue a description of the desired properties of an object. The Trading Service then matches object services with the clients seeking these services.
Buyers, or importers, of services use a Lookup
interface to advertise their needs, while sellers, or exporters, of
services use a Register
interface to advertise
the properties of their services. If an importer receives multiple
hits on a query issued through the Lookup
interface, they are given an OfferIterator
to
iterate through the offers for any that they want to accept. An
Admin
interface is used to query for all
outstanding offers and queries, and to control parameters related to
how the two are matched.
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.