Module Class Advertisements
A module class advertisement describes a class of modules. That is, it describes an expected behavior and expected API for each JXTA binding (that supports such modules). The purpose of this advertisement is to provide a description of what a particular module class ID stands for. (See Example 14-4.)
A module class ID is what other modules or other code running on JXTA uses to designate modules that it depends on. The module class advertisement is not required to provide a completely formal description of a module’s behavior and API; it is intended for humans who want to create modules with a similar functionality.
It is not required to publish a module class advertisement for a module class ID to be valid, although it is a good practice.
Example 14-4. Module class advertisement schema
<xs:element name="MCA" type="jxta:MCA"/>
<xs:complexType name="MCA">
<xs:element name="MCID" type="JXTAID"/>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Desc" type="xs:anyType" min0ccurs="0"/>
</xs:complexType>The elements in Example 14-4 are:
-
MCID Module class ID. This is a required element that uniquely identifies the class. Each module class has a unique ID. The class ID representation is given in Chapter 15.
-
Name This is an optional name that can be associated with a class. The name is not required to be unique unless it is obtained from a naming service that guarantees name uniqueness.
-
Desc Description. This is an optional ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access