From 6a0be62488b406149903a7368cea8df0f1f27d33 Mon Sep 17 00:00:00 2001 From: jestin Date: Tue, 4 Jun 2002 17:02:02 +0000 Subject: Many major corrections, see changelogs for details. - Domain bug fix - die semantics OK - non CPU-eating socket listeners cVS: ---------------------------------------------------------------------- --- src/TestIvy.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/TestIvy.java') diff --git a/src/TestIvy.java b/src/TestIvy.java index 27a6d08..802f982 100755 --- a/src/TestIvy.java +++ b/src/TestIvy.java @@ -12,6 +12,10 @@ import java.awt.event.* ; * @author François-Régis Colin * @author Yannick Jestin * @author http://www.tls.cena.fr/products/ivy/ + * + * CHANGELOG + * 1.0.10: + * - System.exit on bus die */ class TestIvy extends Panel implements IvyApplicationListener { @@ -41,14 +45,16 @@ class TestIvy extends Panel implements IvyApplicationListener { tfSend.addActionListener(new SENDCB()); p.add(tfSend,BorderLayout.CENTER); add(p,BorderLayout.SOUTH); - bus = new Ivy("JAVA TESTBUS","Testbus is ready",this); + bus = new Ivy("JAVATESTBUS","Testbus is ready",this); bus.start(null); append( "Ivy Domain: "+ bus.getDomain(null) ); } + public static Frame f; + public static void main(String[] args) throws IvyException { TestIvy tb = new TestIvy(); - Frame f = new Frame("TestIvy"); + f = new Frame("TestIvy"); f.addWindowListener( tb.new WCCB(f,tb)) ; f.add(tb, BorderLayout.CENTER); f.pack(); @@ -63,7 +69,8 @@ class TestIvy extends Panel implements IvyApplicationListener { append(client.getApplicationName() + " disconnected " ); } public void die(IvyClient client, int id) { - append(client.getApplicationName() + " die "+ id ); + f.dispose(); + System.exit(0); } public void directMessage(IvyClient client, int id, String arg) { append(client.getApplicationName() + " direct Message "+ id + arg ); -- cgit v1.1