fr.dgac.ivy.Probe is your swiss army knife as an Ivy java developper. Use it to try your regular expressions, to check the installation of the system, to log the messages, etc.
The command line options ( available with the --help switch ) are the following:
-b allows you to specify the ivy bus. This overrides the -DIVY_BUS java property. The default value is 127.255.255.255:2010.
-n NAME allows you to specify the name of this probe agent on the bus. It defaults to JPROBE, but it might be difficult to differenciate which jprobe sent which message with a handful of agents with the same name
-q allows you to spawn a silent jprobe, with no terminal output.
-d allows you to use JPROBE on debug mode. It is the same as setting the VY_DEBUG property ( java -DIVY_DEBUG fr.dgac.ivy.Probe is the same as java fr.dgac.ivy.Probe -d )
-h dumps the command line options help.
The run time commands are preceded by a single dot (.) at the beginning of the line. Issue ".help" at the prompt ( without the double quotes ) to have the list of availables comands. If the lines does not begin with a dot, jprobe tries to send the message to the other agents, if their subscriptions allows it. The dot commands are the following
.die CLIENTNAME issues an ivy die command, presumably forcing the first agent with this name to leave the bus
.bye (or .quit) forces the JPROBE application to exit. This is the same as issing an end of file character on a single input line ( ^D ).
.direct client id message sends the direct message to the remote client, using the numeric id
.list gives the list of clients seen on the ivy bus
.ping issues a ping request. This is only available for ivy java clients so far, and allows you to try and send a packet to a remote agent, in order to check the connectivity.
As the launching and quitting of an ivy bus is a bit slow, it is not convenient to spawn an Ivy client each time we want to send a simple message. To do so, we can use the IvyDaemon, which is a TCP daemon sitting and waiting on the port 3456, and also connected on the default bus. Each time a remote application connects to this port, every line read until EOF will be forwarded on the bus. The standard port and bus domain can be overriden by command line switches. ( java fr.dgac.ivy.IvyDaemon -h ).
First, spawn an ivy Damon: $ java fr.dgac.ivy.IvyDaemon
then, within your shell scripts, use a short tcp connexion ( for instance netcat ) : $ echo "hello world" | nc -q 0 localhost 3456
The message will be sent on the default Ivy Bus.
Direct messages is an ivy feature allowing the exchange of information between two ivy clients. It overrides the subscription mechanism, making the exchange faster ( there is no regexp matching, etc ). However, this features breaks the software bus metaphor, and should be replaced with the relevant bounded regexps, at the cost of a small CPU overhead. The full direct message mechanism in java has been made available since the ivy-java-1.2.3.