diff options
Diffstat (limited to 'doc/html')
-rw-r--r-- | doc/html/guide/advanced.html | 33 | ||||
-rw-r--r-- | doc/html/guide/basic.html | 121 | ||||
-rw-r--r-- | doc/html/guide/contact.html | 27 | ||||
-rw-r--r-- | doc/html/guide/first.html | 112 | ||||
-rw-r--r-- | doc/html/guide/index.html | 46 | ||||
-rw-r--r-- | doc/html/guide/ivyTranslater.java | 29 | ||||
-rw-r--r-- | doc/html/guide/javalib.html | 53 | ||||
-rw-r--r-- | doc/html/guide/style.html | 27 | ||||
-rw-r--r-- | doc/html/guide/what.html | 38 |
9 files changed, 0 insertions, 486 deletions
diff --git a/doc/html/guide/advanced.html b/doc/html/guide/advanced.html deleted file mode 100644 index 385d67b..0000000 --- a/doc/html/guide/advanced.html +++ /dev/null @@ -1,33 +0,0 @@ -<html> -<head> - <title>ivy java advanced functions</title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="basic.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom><a href="style.html">Next</a></td> - </tr></table><hr> - - <h1>Advanced functions</h1> - - <h2>Utilities</h2> - <li>fr.dgac.ivy.TestIvySwing: to be completed - <li>fr.dgac.ivy.TestIvy: to be completed - <li>fr.dgac.ivy.Probe: to be completed - - <h2>Direct Messages</h2> - <p>to be completed - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="basic.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top><a href="style.html">Next</a></td> - </tr><tr> - <td width=33% align=left valign=top>Basic functions</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top>Programmer's style guide</a></td> - </tr></table> -</body> -</html> diff --git a/doc/html/guide/basic.html b/doc/html/guide/basic.html deleted file mode 100644 index ae5daa0..0000000 --- a/doc/html/guide/basic.html +++ /dev/null @@ -1,121 +0,0 @@ -<html> -<head> - <title>ivy java basic functions</title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="first.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom><a href="advanced.html">Next</a></td> - </tr></table><hr> - - <h1>Basic functions</h1> - - <h2>Initialization and Ivy loop</h2> - - <p> Initializing a java Ivy agent is a two step process. First of all, - you must create an <em>fr.dgac.ivy.Ivy</em> object. Once this object - is created, you can add subscriptions to Ivy events, be it messaged, - arrival or departure of other agents, etc, but your agent is still not - connected. In order to connect, you should call the <em>start()</em> - method on your Ivy object. This will run two threads that will - remain active until you call the <em>stop()</em> method on your Ivy - object. Once the start() method has been called, your agent is ready - to handle messages on the bus ! - - <p>Here are more details on the Ivy constructor: - -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> - fr.dgac.ivy.Ivy(java.lang.String name, java.lang.String message, IvyApplicationListener appcb) -<br> -</td></tr></table> - This constructor readies the structures for the software bus connexion. It - is possible to have different busses at the same time in an application, be - it on the same bus or on different ivy busses. - <li>The <em>name</em> is the name of the application on the bus, - and will by transmitted to other applicatino, and possibly be used - by them. - <li>The <em>message</em> is the first message that will be sent - to other applications, with a slightly different broadcasting scheme - than the normal one ( see <em>The Ivy architecture and procotol</em> - document for more information). If <em>message</em> is null, nothing - will be sent. - <li><em>appcb</em>, if non null, is an object implementing the - IvyApplicationListener interface. Its different methods will be called - upon arrival or departure of an agent on the bus, when your application - itself will leave the bus, or when a direct message will be sent to your - application. - - <p>Here are more details on the start() method: -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -public void start(java.lang.String domainbus) throws IvyException -<br> -</td></tr></table> - - This method connects the Ivy bus to a domain or list of - domains. <em>domainbus</em> is a string of the form 10.0.0:1234, - it is similar to the netmask without the trailing .255. This will - determine the meeting point of the different applications. Right - now, this is done with an UDP broadcast. Beware of routing problems - ! You can also use a comma separated list of domains, for instance - "10.0.0.1234,192.168:3456". If the domain is <em>null</em>, the API - will check for the property <em>IVY_DOMAIN</em>, if not present, it - will use the default bus, which is 127.255.255.255:2010, and requires - a loopback interface to be active on your system. This method will spawn two - threads, one listening to broadcasts from other agents, and one listening on - the service UDP socket, where remote agent will come and connect. - <p>If an IvyException is thrown, your application is not able to talk to the - domain bus. - - <p>Here are more details on the stop() method: -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -public void stop() -<br> -</td></tr></table> - This methods stops the threads, closes the sockets and does some clean up. - You can reconnect to the bus by calling start() once again. - - <h2>Emitting messages</h2> - - Emitting a message is much like writing a string on a output stream. The - message will be sent if you are connected to the bus. - -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -public int sendMsg(String s) -<br> -</td></tr></table> - Will send each remote agent the substring in case there is a regexp - matching. The int result is the number of messages actually sent. - - <h2>Subscribing to messages</h2> - - Subscribing to messages consists in binding a callback function to a message pattern. Patterns are described by regular expressions with captures. When a message matching the regular expression is detected on the bus, the callback function is called. The captures (ie the bits of the message that match the parts of regular expression delimited by brackets) are passed to the callback function much like options are passed to main. Use the bindMsg method to bind a callback to a pattern, and the unbindMsg method to delete the binding. - -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -public int bindMsg(String regex, IvyMessageListener callback) -<br>public void unBindMsg(int id) -<br> -</td></tr></table> - - The <em>regex</em> follows the gnu.regexp regular expression syntax. -Grouping is done with parenthesis. The callback is an object implementing the -IvyMessageListener interface, with the receive method. The thread listening on -the connexion with the sending agent will execute the callback. - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="first.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top><a href="advanced.html">Next</a></td> - </tr><tr> - <td width=33% align=left valign=top>Your first ivy java application</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top>Advanced Functions</a></td> - </tr></table> -</body> -</html> diff --git a/doc/html/guide/contact.html b/doc/html/guide/contact.html deleted file mode 100644 index a4b3fed..0000000 --- a/doc/html/guide/contact.html +++ /dev/null @@ -1,27 +0,0 @@ -<html> -<head> - <title>Contacting the ivy java authors</title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="style.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom></td> - </tr></table><hr> - - <h1>Contacting the authors</h1> - - <p>The Ivy C library was mainly written by Francois-Régis Colin, and Yannick Jestin. For bug reports or comments on the library itself or about this document, please send them an email: <a href="mailto:fcolin@cena.fr">fcolin@cena.fr</a> and <a href="mailto:jestin@cena.fr">jestin@cena.fr</a>. For comments and ideas about Ivy itself (protocol, applications, etc), please use the Ivy mailing list: <a href="mailto:ivy@tls.cena.fr">ivy@tls.cena.fr</a>. - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="style.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top></td> - </tr><tr> - <td width=33% align=left valign=top>Previous title</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top></td> - </tr></table> -</body> -</html> diff --git a/doc/html/guide/first.html b/doc/html/guide/first.html deleted file mode 100644 index 97ab74c..0000000 --- a/doc/html/guide/first.html +++ /dev/null @@ -1,112 +0,0 @@ -<html> -<head> - <title>your first Ivy java application </title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="javalib.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom><a href="basic.html">Next</a></td> - </tr></table><hr> - - <h1>Your first Ivy java application</h1> - - <p>We are going to write a "Hello world translater" for an Ivy bus. The - application will subscribe to all messages starting - with "Hello", and re-emit them after translating "Hello" into "Bonjour". In - addition, the application will quit when it receives any message containing - exactly "Bye". - - <h2>The code</h2> - There is the code of <a href="ivyTranslater.java">ivyTranslater.java</a>: - -<TABLE cellpadding=0 cellspacing=0 width=100%> -<tr BGcolor=#e0e0e0 TEXT=#000000><td> -<PRE> -<FONT color=#c000c0>import</FONT> fr.dgac.ivy.* ; - -<FONT color=#008000>class</FONT> ivyTranslater <FONT color=#008000>implements</FONT> IvyMessageListener { - - <FONT color=#008000>private</FONT> Ivy bus; - - ivyTranslater() { - <FONT color=#0000c0>// initialization</FONT> - bus = <FONT color=#804000>new</FONT> Ivy(<FONT color=#c00000>"IvyTranslater"</FONT>,<FONT color=#c00000>"Hello le monde"</FONT>,<FONT color=#c00000>null</FONT>); - bus.bindMsg(<FONT color=#c00000>"^Hello(.*)"</FONT>,<FONT color=#008000>this</FONT>); - bus.bindMsg(<FONT color=#c00000>"^Bye$"</FONT>,<FONT color=#804000>new</FONT> IvyMessageListener() { - <FONT color=#0000c0>// callback for </FONT><FONT color=#c00000>"Bye"</FONT><FONT color=#0000c0> message</FONT> - <FONT color=#008000>public</FONT> <FONT color=#008000>void</FONT> receive(IvyClient client, String[] args) {System.exit(<FONT color=#c00000>0</FONT>);} - }); - <FONT color=#804000>try</FONT> { - <FONT color=#0000c0>// starts the bus on the default domain or IVY_DOMAIN property</FONT> - bus.start(<FONT color=#c00000>null</FONT>); - } <FONT color=#804000>catch</FONT> (IvyException ie) { - System.err.println(<FONT color=#c00000>"can't run the Ivy bus"</FONT> + ie.getMessage()); - } - } - - <FONT color=#0000c0>// callback associated to the </FONT><FONT color=#c00000>"Hello"</FONT><FONT color=#0000c0> messages</FONT><FONT color=#c00000>"</FONT> - <FONT color=#008000>public</FONT> <FONT color=#008000>void</FONT> receive(IvyClient client, String[] args) { - bus.sendMsg(<FONT color=#c00000>"Bonjour"</FONT>+((args.length><FONT color=#c00000>0</FONT>)?args[<FONT color=#c00000>0</FONT>]:<FONT color=#c00000>""</FONT>)); - } - - <FONT color=#008000>public</FONT> <FONT color=#008000>static</FONT> <FONT color=#008000>void</FONT> main(String args[]) { <FONT color=#804000>new</FONT> ivyTranslater(); } -} -</PRE> -</td></tr></table> - - <h2>Compiling</h2> - <p>On a Unix computer, you should be able to compile the application with the - following command : - -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -$ javac ivyTranslater.java -<br>$ -</td></tr></table> - - <h2>Testing</h2> - <p>We are going to test our application with Probe. In a terminal window, - launch ivyTranslater: - -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -$ java ivyTranslater -<br> -</td></tr></table> - - <p>Then in another terminal window, launch Probe. You are then ready to - start, Type "Hello Paul", and you should get "Bonjour Paul". Then Type "Bye", - and your application should quit : - -<table cellpadding=0 cellspacing=0 width=100%> -<tr bgcolor=#e0e0e0 text=#000000><td> -$ java fr.dgac.ivy.Probe '(.*)' -<br>you want to subscribe to (.*) -<br>broadcasting on 127.255.255.255:2010 -<br>IvyTranslater connected -<br>IvyTranslater subscribes to ^Bye$ -<br>IvyTranslater subscribes to ^Hello(.*) -<br>IvyTranslater sent 'Hello le monde' -<br><b>Hello Paul</b> -<br>-> Sent to 1 peers -<br>IvyTranslater sent 'Bonjour Paul' -<br><b>Bye</b> -<br>-> Sent to 1 peers -<br>IvyTranslater disconnected -<br><Ctrl-D> -<br>$ -</td></tr></table> - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="javalib.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top><a href="basic.html">Next</a></td> - </tr><tr> - <td width=33% align=left valign=top>The Ivy java library</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top>Basic functions</a></td> - </tr></table> -</body> -</html> diff --git a/doc/html/guide/index.html b/doc/html/guide/index.html deleted file mode 100644 index 895afe8..0000000 --- a/doc/html/guide/index.html +++ /dev/null @@ -1,46 +0,0 @@ -<html> -<head> - <title> - The Ivy java library guide - </title> -</head> -<body> - <h1>The Ivy Java library guide</h1> - - <p><a href="mailto:fcolin@cena.fr">François-Régis Colin</a> - <br><a href="mailto:jestin@cena.fr">Yannick Jestin</a> - - <p>Copyright © 2000 Centre d'Études de la Navigation Aérienne - - <p>This document is a programmer's guide that describes how to use the Ivy - Java library to connect applications to an Ivy bus. This guide describes - version 3.0 of the library - - <p><hr> - - <b>Table of Contents</b> - - <p><a href="index.html">Foreword</a> - <br><a href="what.html">What is Ivy ?</a> - <br><a href="javalib.html">The Ivy java library</a> - <br><a href="first.html">Your first java ivy application</a> - <br><a href="basic.html">Basic functions</a> - <br><a href="advanced.html">Advanced functions</a> - <br><a href="style.html">Programmer's style guide</a> - <br><a href="contact.html">Contacting the authors</a> - - <h2>Foreword</h2> - - <p>This document was written in HTML. The authors are aware that this is - probably not the best format for programming documentation, especially with - regard to printing. However, a documentation was needed fast. This document - is both incomplete and ugly. - - <p><hr> - <div align=right> - <a href="what.html">Next</a> - <br>What is ivy? - </div> - -</body> -</html> diff --git a/doc/html/guide/ivyTranslater.java b/doc/html/guide/ivyTranslater.java deleted file mode 100644 index 696633c..0000000 --- a/doc/html/guide/ivyTranslater.java +++ /dev/null @@ -1,29 +0,0 @@ -import fr.dgac.ivy.* ; - -class ivyTranslater implements IvyMessageListener { - - private Ivy bus; - - ivyTranslater() { - // initialization - bus = new Ivy("IvyTranslater","Hello le monde",null); - bus.bindMsg("^Hello(.*)",this); - bus.bindMsg("^Bye$",new IvyMessageListener() { - // callback for "Bye" message - public void receive(IvyClient client, String[] args) {System.exit(0);} - }); - try { - // starts the bus on the default domain or IVY_DOMAIN property - bus.start(null); - } catch (IvyException ie) { - System.err.println("can't run the Ivy bus" + ie.getMessage()); - } - } - - // callback associated to the "Hello" messages" - public void receive(IvyClient client, String[] args) { - bus.sendMsg("Bonjour"+((args.length>0)?args[0]:"")); - } - - public static void main(String args[]) { new ivyTranslater(); } -} diff --git a/doc/html/guide/javalib.html b/doc/html/guide/javalib.html deleted file mode 100644 index 2738e54..0000000 --- a/doc/html/guide/javalib.html +++ /dev/null @@ -1,53 +0,0 @@ -<html> -<head> - <title>The Ivy java library</title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="what.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom><a href="first.html">Next</a></td> - </tr></table><hr> - - <h1>The Ivy java library</h1> - - <p><h2>What is it?</h2> - <p>The Ivy J library (aka ivy-java) is a java package that allows you to - connect applications to an Ivy bus. You can use it to write applications - in java 1.1 - <p>You can also use it to integrate any thread-safe java application. - <p>The Ivy java library is known to compile and work in WindowsNT and Linux - environments. There are reported bugs for the java 2 jdk1.3 platform. - It should be easy to use on most java environments. - <p>The Ivy java library was originally developed by François-Régis Colin and - Yannick Jestin at CENA. It is maintained by a group at CENA (Toulouse, - France) - - <p><h2>Getting and installing the Ivy java library</h2> - You can get the latest versions of the Ivy C library from CENA - (<a href="http://www.tls.cena.fr/products/ivy/" - >http://www.tls.cena.fr/products/ivy/</a>). We plan to package it according - to different distribution formats, such as .msi (Windows), .deb (Debian) or - .rpm (Redhat). - <p>The package is distributed as a JAR file. In order to use it, either add - it in your CLASSPATH, or put the jar in your $JAVA_HOME/jre/lib/ext/ - directory, if you use a jdk1.2. The package contains the documentation, - the sources and the class files for the fr.dgac.ivy package. - <p>In order to test the presence of Ivy on your system once installed, run - the following command: - <pre> -$ java fr.dgac.ivy.TestIvy - </pre> - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="what.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top><a href="first.html">Next</a></td> - </tr><tr> - <td width=33% align=left valign=top>What is Ivy?</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top>Your first Ivy application</a></td> - </tr></table> -</body> -</html> diff --git a/doc/html/guide/style.html b/doc/html/guide/style.html deleted file mode 100644 index 70df3bf..0000000 --- a/doc/html/guide/style.html +++ /dev/null @@ -1,27 +0,0 @@ -<html> -<head> - <title>ivy java programmer's style guide</title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="advanced.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom><a href="contact.html">Next</a></td> - </tr></table><hr> - - <h1>programmer's style guide</h1> - - <p>to be completed - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="advanced.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top><a href="contact.html">Next</a></td> - </tr><tr> - <td width=33% align=left valign=top>Advanced functions</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top>Contacting the Authors</a></td> - </tr></table> -</body> -</html> diff --git a/doc/html/guide/what.html b/doc/html/guide/what.html deleted file mode 100644 index 355f2b0..0000000 --- a/doc/html/guide/what.html +++ /dev/null @@ -1,38 +0,0 @@ -<html> -<head> - <title>What is Ivy?</title> -</head> -<body> - <table width=100% border=0 cellpadding=0 cellspacing=0><tr><th colspan=3 align=center> - The Ivy java library guide</th></tr><tr> - <td width=10% align=left valign=bottom><a href="index.html">Prev</a></td> - <td width=80% align=center valign=bottom> - <td width=10% align=right valign=bottom><a href="javalib.html">Next</a></td> - </tr></table><hr> - - <h1>What is Ivy?</h1> - <p>Ivy is a software bus designed at CENA (France). A software bus is - a system that allows software applications to exchange information - with the illusion of broadcasting that information, selection being - performed by the receiving applications. Using a software bus is very - similar to dealing with events in a graphical toolkit: on one side, - messages are emitted without caring about who will handle them, and on - the other side, one decide to handle the messages that have a certain - type or follow a certain pattern. Software buses are mainly aimed at - facilitating the rapid development of new agents, and at managing a - dynamic collection of agents on the bus: agents show up, emit messages - and receive some, then leave the bus without blocking the others. - - <p>Ivy is implemented as a collection of libaries for several languages and platforms. If you want to read more about the principles Ivy before reading this guide of the java library, please refer to <em>The Ivy sofware bus: a white paper</em>. If you want more details about the internals of Ivy, have a look at <em>The Ivy architecture and protocol</em>. And finally, if you are more interested in other languages, refer to other guides such as <em>The Ivy C library guide</em> or <em>The Ivy Perl library guide</em>. All those documents should be available from the Ivy Web site at <a href="http://www.tls.cena.fr/products/ivy/">http://www.tls.cena.fr/products/ivy/</a>. - - <p><hr><table width=100% border=0 cellpadding=0 cellspacing=0><tr> - <td width=33% align=left valign=top><a href="index.html">Prev</a></td> - <td width=34% align=center valign=top><a href="index.html">Home</a></td> - <td width=33% align=right valign=top><a href="javalib.html">Next</a></td> - </tr><tr> - <td width=33% align=left valign=top>The Ivy java library guide</td> - <td width=34% align=center valign=top> </td> - <td width=33% align=right valign=top>The Ivy java library</a></td> - </tr></table> -</body> -</html> |