Chapter 16. The JXTA Message Specification

Messages are the basic unit of data exchange between peers. Pipes send and receive messages to and from services; any JXTA protocols implemented by a service will send and receive JXTA messages. JXTA uses a binary format message representation that guarantees the efficient transfer of binary and XML data. Each JXTA transport binding may use the representations deemed to be the most appropriate. For example, both the TCP/IP and HTTP transport binding implemented in the JXTA reference implementation use the binary message format.

Messages

A message is a set of named and typed content called elements. Thus, a message is essentially a set of name/value pairs. The content can be an arbitrary type. Many core services send XML advertisements as message element content. As a message passes down a protocol stack (applications, services, and transports), each level may add one or more named elements to the message. As a message passes back up the stack, the protocol will remove these elements. A message is an ordered sequence of message elements. The most recently added element appears at the end of the message.

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.