aboutsummaryrefslogtreecommitdiff
path: root/tests/Bug.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Bug.java')
-rw-r--r--tests/Bug.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/Bug.java b/tests/Bug.java
new file mode 100644
index 0000000..706d951
--- /dev/null
+++ b/tests/Bug.java
@@ -0,0 +1,36 @@
+import fr.dgac.ivy.* ;
+
+class Bug implements IvyApplicationListener {
+
+ private Ivy bus;
+
+ Bug() {
+ bus = new Ivy("Bug","Hello le monde",this);
+ try {
+ bus.start(null);
+ } catch (IvyException ie) {
+ System.err.println("can't run the Ivy bus" + ie.getMessage());
+ }
+ }
+
+ public void disconnect(IvyClient client) { }
+
+ public void directMessage(IvyClient client,int id,String msgarg) {}
+
+ public void connect(IvyClient client) {
+ System.out.println("sending messages");
+ bus.sendMsg("coucou");
+ bus.sendMsg("titi");
+ bus.sendMsg("tata");
+ bus.sendMsg("toto");
+ System.out.println("done");
+ }
+
+ public void die(IvyClient client,int id) {
+ System.out.println("argh. cya");
+ }
+
+ public static void main(String args[]) {
+ new Bug();
+ }
+}