aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjestin2002-06-05 09:35:57 +0000
committerjestin2002-06-05 09:35:57 +0000
commit044b408ae99989be9a7eed89ed51a6aba5aa42d9 (patch)
tree22b698dbc3e6a5b242161d50ba647031b13c23dc
parent11cd642b20045e35293f8510fbab5be9eeca11d7 (diff)
downloadivy-java-044b408ae99989be9a7eed89ed51a6aba5aa42d9.zip
ivy-java-044b408ae99989be9a7eed89ed51a6aba5aa42d9.tar.gz
ivy-java-044b408ae99989be9a7eed89ed51a6aba5aa42d9.tar.bz2
ivy-java-044b408ae99989be9a7eed89ed51a6aba5aa42d9.tar.xz
Clean package build.
-rw-r--r--BUGS4
-rw-r--r--Changelog7
-rw-r--r--README12
-rw-r--r--TODO21
-rw-r--r--debian/changelog13
-rwxr-xr-xdebian/rules2
-rw-r--r--doc/ivy-java.132
-rw-r--r--examples/Counter.java96
-rw-r--r--examples/Makefile16
-rw-r--r--[-rwxr-xr-x]examples/TestIvy.java (renamed from src/TestIvy.java)0
-rw-r--r--examples/TestIvySwing.java (renamed from src/TestIvySwing.java)0
-rw-r--r--manifest2
-rwxr-xr-xsrc/Ivy.java2
-rw-r--r--src/Makefile2
14 files changed, 154 insertions, 55 deletions
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..4f99e86
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,4 @@
+Known bugs:
+
+ it seems not to work with jdk1.1.7A VM.
+
diff --git a/Changelog b/Changelog
index 6768241..1c5d8e7 100644
--- a/Changelog
+++ b/Changelog
@@ -1,7 +1,10 @@
CHANGELOG
-1.0.10 -------------------------------------
-mar jun 4 19:00:32 CEST 2002
+1.0.11 mer jun 5 11:33:16 CEST 2002
+
+ Just a debian package change. No java modification per se.
+
+1.0.10 mar jun 4 19:00:32 CEST 2002
TestIvy:
System.exit on bus die
diff --git a/README b/README
index e8c43e4..c5e700f 100644
--- a/README
+++ b/README
@@ -17,14 +17,14 @@ to your usual installation directory for Java archives.
To use ivy-java, you will need to include it in your classpath
setting. Typically this is done by adding an entry to your CLASSPATH
variable setting with the full path to the JAR file, e.g.
- csh: % setenv CLASSPATH ${CLASSPATH}:/usr/java/lib/ivy-java-1.0.9.jar
- bash: % export CLASSPATH=${CLASSPATH}:/usr/java/lib/ivy-java-1.0.9.jar
- DOS: > set CLASSPATH %CLASSPATH%;C:\Java\lib\ivy-java-1.0.9.jar
+ csh: % setenv CLASSPATH ${CLASSPATH}:/usr/java/lib/ivy-java-1.0.11.jar
+ bash: % export CLASSPATH=${CLASSPATH}:/usr/java/lib/ivy-java-1.0.11.jar
+ DOS: > set CLASSPATH %CLASSPATH%;C:\Java\lib\ivy-java-1.0.11.jar
Various shells and operating systems may have slightly different methods.
Consult your Java virtual machine documentation for details. You may also
specify the -classpath option to the java executable, e.g.
-compile: % javac -classpath /usr/java/lib/ivy-java-1.0.9.jar MyClass.java
-execute: % java -classpath /usr/java/lib/ivy-java-1.0.9.jar MyClass
+compile: % javac -classpath /usr/java/lib/ivy-java-1.0.11.jar MyClass.java
+execute: % java -classpath /usr/java/lib/ivy-java-1.0.11.jar MyClass
DOCUMENTATION
@@ -64,7 +64,7 @@ using and how you were using it.
LATEST VERSION
You can always obtain info about the latest version of ivy-java at
-http://www.tls.cena.fr/~jestin/ivy-java. New versions are also announced on
+http://www.tls.cena.fr/~jestin/ivy-java/ . New versions are also announced on
the ivy mailing list (see above).
Thanks!
diff --git a/TODO b/TODO
deleted file mode 100644
index e10b1f6..0000000
--- a/TODO
+++ /dev/null
@@ -1,21 +0,0 @@
-BUGS
--------------------------------------
-protocol error quand j'utilise une VM 1.4.0
-procol error entre un ivyprobe C sur bilsa et un Probe java sur geant en multicast,
- à l'envoi d'un message
-Use alternate regexp classes (SplitEECclient, ... )
-
-TODO
--------------------------------------
-Regression tests: I should check many items before adding a new release.
- - are regexp correct ?
- - case dependent ?
- - connexion order dependant or not ?
- - messages transmitted ?
- - multiple domains
- - SDK Dependance ? problem with vectors on jdk 1.1.7
- - 3 tiers checking: disconnect, die and disconnect from the others
-Code cleaning ( public / private )
-debian package is not built properly ( debian build depends )
-Makefile -> ant ?
-test between a 1.1.8 jdk and a 1.3.1 -> failure :-\
diff --git a/debian/changelog b/debian/changelog
index a68b9d2..7ce656a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+ivy-java (1.0.11) unstable; urgency=low
+
+ - moved TestIvy and TestIvySwing to examples
+ - added Counter.java in CVS repository and examples. Counter gives the
+ number of ivy message in the last second, last ten seconds, and last
+ minutes. It can also send those information on an ivy bus
+ - added a Makefile in examples
+ - modified the ivy-java man page
+ - made a link to /usr/share/java/repository/gnu instead of copying the files
+ - changed the package version number scheme to be a little more "debian compliant"
+
+ -- Yannick Jestin <jestin@cena.fr> Wed, 5 Jun 2002 11:30:31
+
ivy-java (1.0.10-1) unstable; urgency=low
- TestIvy and Probe System.exit on bus die
diff --git a/debian/rules b/debian/rules
index e2964a6..6c59926 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,7 +35,7 @@ debian/stamp/binary/ivy-java : debian/stamp/build
gzip -9 $(mandir)/ivy-java.1
rm -f $(docdir)/changes.html
$(install_nonex) debian/README.Debian $(docdir)
- $(install_nonex) README TODO $(docdir)
+ $(install_nonex) BUGS README $(docdir)
$(install_nonex) examples/*.java $(exampledir)
$(install_nonex) debian/ivy-java $(docbasedir)
$(install_nonex) doc/changes.html $(docdir)/changelog.html
diff --git a/doc/ivy-java.1 b/doc/ivy-java.1
index 50dffb3..5d87524 100644
--- a/doc/ivy-java.1
+++ b/doc/ivy-java.1
@@ -8,7 +8,7 @@
.\" '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
.\" '\"
.\" '\"
-.TH "Ivy-java-1.0" "1" "1.0.9" "Yannick Jestin" ""
+.TH "Ivy-java-1.0" "1" "1.0.11" "Yannick Jestin" ""
.SH "NAME"
ivy\-java \- a software bus library java implementation
.SH "SYNOPSIS"
@@ -33,12 +33,6 @@ The essential classes of Ivy Java are:
.I Ivy:
\ API for the connexion to the software bus
.nf
-.I IvyWatcher:
-\ to handle UDP socket
-.nf
-.I IvyMessageListener:
-\ to receive messages
-.nf
.I IvyApplicationListener:
\ contains 4 virtual methods for handling connexion/deconnexion,
die and direct messages
@@ -49,11 +43,6 @@ die and direct messages
.I Probe:
\ to test the regular expressions in a terminal
.nf
-.I TestIvy:
-\ to test the regular expressions in an AWT window
-.nf
-.I TestIvySwing:
-\ to test the regular expressions in a swing window
.I IvyDaemon:
\ a daemon to access the bus via a simple socket: you connect (default port :
3456 ), write a msg, and exit, the daemon will send the message. This is
@@ -65,14 +54,13 @@ localhost 3456 )
argument. It can be a list of addresses followed by a port number. The default is a
datagram local address on a non priviledged port 127.255.255.255:2010 , it can also be
shortened to 127:2010. You can specify other datagram adresses with respect to your
-local configuration (see ifconfig(1) ), and you can specify a multicast address 228.5.6.7
- for instance. You can supply multiple domains, separated by colons
+local configuration (see ifconfig(1) ), and you can specify a multicast
+address 228.5.6.7:8910 for instance. You can supply multiple domains, separated by colons
.I the IVYBUS shell variable is not used, since the policy of the JDK has
changed on this point since 1.3 . You can still use it on a previous JDK.
.nf
-
.SH "FILES"
.I /usr/share/java/repository/fr/dgac.ivy/*.class
.nf
@@ -80,14 +68,14 @@ changed on this point since 1.3 . You can still use it on a previous JDK.
.SH "EXAMPLES"
.nf
-java \-DIVYBUS=143.196.53.255:2011 fr.dgac.ivy.TestIvy
+java \-DIVYBUS=143.196.53.255:2011 fr.dgac.ivy.Probe
.nf
java \-DIVYBUS=127.0.0.1:3042,10.192.36:2021,228.5.6.7:54321 fr.dgac.ivy.Probe '^coucou (.*)'
.nf
java fr.dgac.ivy.Probe \-b 10.192.36:2021 '^coucou (.*)'
.SH "NEEDED LIBRARIES"
-.I jdk 1.1, 1.2 or 1.3. The AWT version used to work on 1.0.9, but it has not
+.I jdk 1.1, 1.2 or 1.3. The AWT version used to work on 1.0.11, but it has not
been tested since
.nf
.I libgnu\-regexp\-java version 1.1.3
@@ -97,14 +85,14 @@ been tested since
.I for TestIvySwing, swing if it is not bundled in your jdk1.1
.SH "BUGS"
-None reported yet ;) Well...
-.I Probe doesn't die on the die message.
+So far, there are problems with old java VMs ( 1.1.7A ) and newest VMs ( 1.4.0
+).
.SH "AUTHORS"
.nf
-Francois\-Regis Colin <fcolin@cena.fr>
-.nf
Yannick Jestin <jestin@cena.fr>
+.nf
+Francois\-Regis Colin <fcolin@cena.fr>
.SH "SEE ALSO"
ivy\-c (1)
.nf
@@ -118,7 +106,7 @@ For further details, please refer to the Ivy html page at http://www.tls.cena.fr
.SH "NOTES"
In case of any comment or bug report on this library, please contact
-fcolin@cena.fr, jestin@cena.fr
+jestin@cena.fr
.nf
Special thanks to Michelle Jacomi (jacomi@cena.fr) for her kind support
diff --git a/examples/Counter.java b/examples/Counter.java
new file mode 100644
index 0000000..bc23938
--- /dev/null
+++ b/examples/Counter.java
@@ -0,0 +1,96 @@
+/**
+ * a software bus package geiger counter
+ *
+ * @author Yannick Jestin
+ * @author <a href="http://www.tls.cena.fr/products/ivy/">http://www.tls.cena.fr/products/ivy/</a>
+ *
+ */
+import fr.dgac.ivy.* ;
+import gnu.getopt.Getopt ;
+
+
+/**
+ * A program to count to the Ivy software bus messages.
+ * The class itself can be used to collect data and send them on the terminal
+ * or on the bus.
+ */
+public class Counter implements IvyMessageListener, Runnable {
+
+ private Ivy bus ;
+ private int[] secCount = new int[60];
+ private int totalminute=0;
+ private int totaldix=0;
+ private int counter=0;
+ private int moindix=secCount.length-10;
+ private int moinune=1;
+ private Thread thread;
+ boolean isRunning=false;
+ boolean quiet=false;
+
+ public static final String helpmsg = "usage: java Counter -[options]\n\t-b BUS\tspecifies the Ivy bus domain\n\t-q\tquiet, no tty output\n\t-d\tdebug\n\t-h\thelp\n";
+
+ public Counter(String domain,boolean quiet) {
+ this.quiet=quiet;
+ for (int j=0;j<secCount.length;j++) {secCount[j]=0;}
+ bus = new Ivy("Counter","Counter ready",null);
+ bus.bindMsg(".*",this);
+ bus.bindMsg("^EXHAUSTED$",new IvyMessageListener(){
+ public void receive(IvyClient client,String[] args) {
+ isRunning=false;
+ }
+ });
+ thread = new Thread(this);
+ isRunning=true;
+ thread.start();
+ try {
+ bus.start(domain);
+ } catch (IvyException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // implements the Runnable interface
+ public void run() {
+ while (isRunning) {
+ try {
+ thread.sleep(1000);
+ } catch (InterruptedException ie) {
+ }
+ totalminute+=secCount[counter]-secCount[moinune];
+ totaldix+=secCount[counter]-secCount[moindix];
+ String s = "MessageCount "+ secCount[counter]+" "+totaldix+" "+totalminute;
+ if (!quiet) { System.out.println(s); }
+ bus.sendMsg(s);
+ moinune=(moinune+1)%secCount.length;
+ moindix=(moindix+1)%secCount.length;
+ counter=(counter+1)%secCount.length;
+ secCount[counter]=0;
+ }
+ }
+
+ public void receive(IvyClient client,String[] args) { secCount[counter]++; }
+
+ public static void main(String[] args) {
+ String domain="127.255.255.255:2010";
+ Getopt opt = new Getopt("Counter",args,"b:dhq");
+ int c;
+ boolean quiet=false;
+ while ((c=opt.getopt()) != -1 ) switch(c) {
+ case 'q':
+ quiet=true;
+ break;
+ case 'b':
+ domain=opt.getOptarg();
+ break;
+ case 'd':
+ System.setProperty("IVY_DEBUG","yesla!");
+ break;
+ case 'h':
+ default:
+ System.out.println(helpmsg);
+ System.exit(0);
+ }
+ new Counter(domain,quiet);
+ } // main
+
+} // class Counter
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 0000000..4c317f3
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,16 @@
+# Be sure to set this before compiling ...
+# JIKESPATH = /usr/lib/j2re1.3/lib/rt.jar:/usr/share/java/repository
+JAVACOPTS = -deprecation
+.SUFFIXES: .java .class
+ SRCS = TestIvy.java TestIvySwing.java Counter.java ivyTranslater.java
+ OBJS = $(SRCS:.java=.class)
+ JAVAC = jikes
+ #JAVAC = javac
+
+.java.class:
+ $(JAVAC) $<
+
+all: $(OBJS)
+
+clean:
+ /bin/rm -f -- $(OBJS) *~ *.bak
diff --git a/src/TestIvy.java b/examples/TestIvy.java
index 802f982..802f982 100755..100644
--- a/src/TestIvy.java
+++ b/examples/TestIvy.java
diff --git a/src/TestIvySwing.java b/examples/TestIvySwing.java
index ed61741..ed61741 100644
--- a/src/TestIvySwing.java
+++ b/examples/TestIvySwing.java
diff --git a/manifest b/manifest
index 21fc1d3..3e903b3 100644
--- a/manifest
+++ b/manifest
@@ -1,3 +1,3 @@
-Manifest-Version: 1.0.10
+Manifest-Version: 1.0.11
Main-Class: fr.dgac.ivy.Probe
Created-By: 1.2 (Sun Microsystems Inc.)
diff --git a/src/Ivy.java b/src/Ivy.java
index f5e32e2..fc0a613 100755
--- a/src/Ivy.java
+++ b/src/Ivy.java
@@ -43,7 +43,7 @@ public class Ivy implements Runnable, IvyApplicationListener {
/**
* the library version
*/
- public static String libVersion ="1.0.10";
+ public static String libVersion ="1.0.11";
private boolean debug;
private static int serial=0; /* an unique ID for each regexp */
diff --git a/src/Makefile b/src/Makefile
index c5e5060..6a3d19c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,7 +5,7 @@ JAVACOPTS = -d . -deprecation
SRCS = *.java
OBJS = $(SRCS:.java=.class)
JAR = ../lib/Ivy.jar
- VER = 1.0.10
+ VER = 1.0.11
DIST = ../lib/ivy-java-$(VER).jar
JAVAC = jikes
#JAVAC = javac