Module Implementation Advertisements

A module implementation advertisement describes one of the implementations of a module specification. Implementations of a given specification may be searched by the specification ID. An implementation may be selected by the type of environment in which it can be used (its compatibility statement) as well as by its name, description, or the content of its parameters section. (See Example 14-6.)

A module implementation advertisement also provides a means to retrieve all the necessary data required in order to execute the implementation being described. This information is encapsulated in the Code and PURI elements because interpretation is subject to the module’s compatibility. For example, the standard peergroup implementation of the Java reference implementation expects Code to be a fully qualified Java class name that designates a subclass of net.jxta.platform.Module and PURI to be the URI of a downloadable package (a jar file). Other execution environments could expect the code to be inline within the Code element, or even have several options.

Example 14-6. Module implementation advertisement schema

<xs:element name="MIA" type="jxta:MIA"/> <xs:complexType name="MIA"> <xs:element name="MSID" type="JXTAID"/> <xs:element name="Comp" type="xs:anyType"/> <xs:element name="Code" type="xs:anyType"/> <xs:element name="PURI" type="xs:anyURI" min0ccurs="0"/> <xs:element name="Prov" type="string" min0ccurs="0"/> <xs:element name="Desc" type="xs:anyType" ...

Get JXTA in a Nutshell 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.