Peer Advertisements
A peer advertisement describes the peer resources (see Example 14-1). The primary use of this advertisement is to hold specific information about the peer, such as its name, peer ID, currently available endpoint addresses, and any runtime attributes that individual group services want to publish (such as being a rendezvous peer for the group).
Example 14-1. Peer advertisement schema
<xs:element name="PA" type="jxta:PA"/>
<xs:complexType name="PA">
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="PID" type="JXTAID"/>
<xs:element name="GID" type="JXTAID"/>
<xs:element name="Desc" type="xs:anyType" minOccurs="0"/>
<xs:element name="Svc" type="jxta:serviceParams" minOccurs="0"
maxOccurs="unbounded"/>
</xs:complexType>
<xs:simpleType name="JXTAID">
<xs:restriction base="xs:anyURI">
<pattern value="([uU][rR][nN]:[jJ][xX][tT][aA]:)+\-+"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="serviceParam">
<xs:element name="MCID" type="JXTAID"/>
<xs:element name="Parm" type="xs:anyType"/>
</xs:complexType>As a secondary use, a peer advertisement represents the configuration of a peer. This configuration is private to the peer and is never published. Both variants have the same structure, but the content differs:
A configuration peer advertisement contains parameters that control the behavior of the various services as well as permanent values, such as the peer name or ID.
A published peer advertisement contains public attributes ...
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