A 'help' command is available to list the commands available. Type 'help<command>'
to get help about a particular command. To exit the Shell,use the 'exit'
command.
Command | Description |
cat | displays on the stdout the content of a jxta object
stored in a environment variable, currently limited to jxta types
jxta> mkadv -p apipe
|
chpgrp | The chpgrp command is used to switch the default
Shell
peer group stdgroup variable to another group that was previously
joined via a join command. The join command is used to join
a peergroup.
After changing group, the Shell stdgroup variable is set to the value of the new peer group joined. |
env | env displays all the defined environment variables in the
Shell seesion. The following environment variables are defined by default:
consin = Default Console InputPipe
|
exit | exits the current shell |
exportfile | exportfile exports the content of a Shell environment
variable into an external file. The exported object is stored in the supplied
filename argument.
If no variable name is given, the 'stdin' pipe is used to read data and saved them into the file. exportfile is the reverse operation of importfile. The Shell environment variable is not deleted after the file is created jxta> exportfile -f /home/userdir/filename peer0
|
get | get retrieve the tag body of a message. JXTA messages
are composed a set of tag body, each identified with an unique tag name
A message tag name is supplied to command to specify which tag body to
extract.
jxta> pipeadv = mkadv -p mypipe
jxta> opipe = mkpipe -o pipeadv
jxta> msg = recv inpipe
jxta> data = get msg mytag |
groups | discovers peer groups by propagation or at a specified peer
location. By default groups lists all the peer groups
known (cached) by the local peer. The -r option is used to send
a propagate request to find new peer groups. groups stores results
in the local cache, and inserts advertisement(s) into the environment,
using the default naming: groupX where X is a growing integer
number.
jxta> groups
jxta > groups -r -aName -vsoccer |
help | Displays Shell help, and available commands |
importfile | imports an external structured document into the shell
environment
jxta> importfile -f /home/userdir/afile envfile |
join | The join command is used to join a peergroup that
was created via a mkpgrp command or using an advertisement that
was previously discovered.
In order to join a group, the group needs to have been discovered or created first. If no argument is given, join lists all the existing groups and their status (join, unjoined) and the current group on the local peer. After a group was joined successfully, the 'PG@<group name>' environment variable is created. This variable holds the group info. When joining a new peer group, the new peer group is advertised in the NetPeerGroup. No hierarchy of peer groups is supported. create a peergroup:
jxta> mkpgrp volleyball
Leave the peer group
jxta> leave
jxta> join -d group#
|
leave | The leave command is used to leave a group that was
previously joined via a join command. The join command is
used to join a peer group.
After leaving the group, the Shell stdgroup variable is reset to the value of the default rootgroup variable (NetPeerGroup). Before a user can use the group again, the user will have to rejoin the group via the join command. jxta>mygroupadv = mkadv -g mygroup |
mkadv | mkadv creates a peer group or pipe advertisement from a
document stored in a shell environment variable. A specific type can be
given for the pipe (TBD). A symbolic name can be associated with
the advertisement. This name can be used to search for the advertisement.
A name must be supplied when creating a new group advertisement. This is
the name of the peer group.
-p for a pipe advertisement jxta> agroupadv = mkadv -g -d fileimported |
mkmsg | creates msg object to use for sending or receiving pipe
messages
see get example |
mkpgrp | mkpgrp creates a new peer group using the supplied
peer group advertisement If no advertisement is provided, the command
will create a clone of the NetPeerGroup peer group with the name
specified.The command mkadv -g is used to create a peer group
advertisement The environment variable PG#<group name>
is created to store the the new group info. The new peer group is
advertised in the NetPeerGroup. All peer groups are created in the
NetPeerGroup
which acts like a world peer group. Every peer group can be found in
this group.
jxta> mkpgrp soccer |
mkpipe | mkpipe creates an input pipe or an output pipe from
a given pipe advertisement document. In order for pipes to communicate
an input and output pipe needs to be created with the same pipe advertisement.
Pipe advertisements are structured documents that contains at least the
unique pipe Id. The pipe Id uniquely identifies a pipe in the JXTA
world. Pipesare not localized or binded to a physical peer. Pipe
connections are established by searching for pipe advertisements
and resolving dynamically the location of an input pipe object binded
to that advertisement. An input pipe can be binded to the same pipe
advertisement on multiple peers transparently tothe output pipe.
The output pipe does not need to known on which physicalpeer the
input pipe is located. To communicate with the pipe, the outputpipe needs
to search for the input pipe that binds that advertisement.
see get example
|
more | more - page through a Shell object |
peerconfig | peerconfig is used to re-configure a peer. The command
forces the platform to show a configuration dialog the next time it starts.
After the command is run the platform need to be restarted. |
peerInfo | Use to get information about other peers within a peer group
or at a specified peer location. The default peerinfo option lists only
the peerinfo advertisements already known by the peer. The '-r' option
is used to send a propagate request to find information about new peers.
peerinfo stores results in the local cache, and inserts advertisement(s) into the environment, using the default naming: peerinfoX where X is a growing integer number. jxta> peerinfo -r |
peers | use peers to discover other peers within a peer group
or at a specified peer location. Running peers command with no options
lists only the peers already known by the peer (cached).The '-r' option
is used to send a propagate request to find new peers. peers command
stores results in the local cache, and inserts advertisement(s) into the
environment, using the default naming: peerX where X is a
growing integer number.
jxta> peers |
put | put store a document into the body of message.JXTA
messages are composed a set of tag body, each identified with an unique
tag name A message tag name is supplied to specify which tag name
is used to store the document. On the receiving end the document
can be retrieved viathe 'get' command.
jxta> importfile -f /home/username/myfile mydata |
recv | recv receives a message from an input pipe. The input
pipe needs to have been previously created. A timeout in seconds can be
given. If no timeout is given, the call will block until a message is received.
A timeout of zero corresponds to a non-blocking call.
see get example |
search | search for an advertisement document that
has a matching (tag,value) field. Documents are searched either
in the local peer cache or remotelly within the reachable peer group members.
Remote search is done asynchronous, matching documents are brought up locally.
There is no guarantee that a published advertisement will be found. A best
effort is made, but the peer that has published the advertisement may be
unavailable at the time the search is performed. The search capability
is rudimentary.It only handles first level tags in a document. The default
is to serach document locally.
jxta> search -r name identity |
send | send - send a message into a pipe
see get exmaple |
setenv | setenv - set an environment variable |
share | share an advertisement document in the current peer
group.
The document is made visible to all the members of the peer group. Advertisements are XML documents that can represent any JXTA objects advertisement, environment variables). Documents are searched either in the local peer cache or remotely via the search command. jxta> share mydoc
|
Shell | Start a new shell
jxta> Shell -s (start a new shell in a new window) |
talk | The talk command implements a simple instant
messaging command where two users on two remote peers can exchange
messages.
Messages are displayed on the Shell stdout. In order to use talk. The user needs to register himself. This is done via the following steps: Step 1: Register via talk -register <username>
command. This command
Step 2: Login via talk -login <username> command. This
command
Step 3: User can talk to another user via the command
jxta> talk -register user1
jxta> talk -register user2To stop receiving any more talk messages. The user can stop the talk listener daemon by entering the command 'talk -logout <username>'" |
wc | wc counts the number of newlines, whitespace-separated
words, and characters in the given shell object, or in the standard
input pipe if no object is specified. It writes one line of countsto
the output pipe. The counts are written in the order: lines, words,
characters.
By default, wc writes all three counts. Options can specify that only certain counts be written. Options do not undo others previously given, so 'wc -c -l' writes both the character count and the line count. jxta>peers | wc |
whoami | whoami displays information about a peer or a peer
group. With no option, whoami returns information about the local
peer. The '-g' option returns information about the current peer
group joined.
By default the Shell is brought up in the NetPeerGroup group. Peers do not have name. A user can assign a symbolic name to a peer via the peerinfo command. There is no guarantee that the name is unique. Only the peerId and the peer group ID are guaranteed to be unique. |
version | displays the current version of the shell, build number and date |