Elements
A message element contains a name, type, and content.
Name
Element names are represented as UTF-8 strings. A name has two parts: a namespace and a simple name. These are separated by a colon.
Name =simple_name
|namespace
":"simple_name
simple_name
may
not contain a colon character and must not be empty. The namespace is not
allowed to contain the colon character.
namespace
must
contain at least one character. Use of an empty namespace
is not allowed; use simple_name
instead.
The namespace prevents name collision
between various services and users of these services. Core services
will use the jxta
namespace. For example:
jxta:TTL
Applications may use the empty
namespace
(simple name).
Legal names are:
jxta:abc ; Namespace=jxta, simple name=abc. lmn ; Namespace empty, simple name=lmn.
Illegal names are:
jxta: ; Empty simple name not allowed. :abc ; Empty namespace not allowed. ; Empty name not allowed.
Type
A type is specified as a MIME type (see [RFC2046]). MIME types are UTF-8 strings. Types are used by applications and services for interpreting the associated message element data. No particular set of MIME types is understood by the core.
The element type may also be used by the JXTA transport for determining how to format the message element data for data transfer. If the transport requires a human-readable message format, such as the HTTP transport, the message element data will need to be encoded.
If the type is not specified for an element, the MIME ...
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.