Name

mkmsg — Creates a pipe message

Synopsis

mkmsg

Description

mkmsg creates a new message that can be used to send or receive data from a pipe. The message object is stored in an environment variable. If no variable is assigned via the = operator, a default environment variable named env # is automatically created (# is a growing integer number).

JXTA messages are composed of multiple tag body parts. Each tag body is identified via a unique tag name. The tag name is used to insert (put) a new tag body in a message or retrieve (get) a tag body from a message.

Example

JXTA>mkmsg

This creates a message object and puts it in the env # environment variable, in which # is an integer number.

JXTA>mymsg = mkmsg
JXAT>put mymsg mytag data
JXTA>send outpipe mymsg

This creates a new message (mymsg), stores data in the message body tag (mytag), and sends the message on the output pipe (outpipe).

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.