aboutsummaryrefslogtreecommitdiff
path: root/tests/Bug.java
blob: 706d951e61c60a8eaffc88f31f7fad148e666a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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();
    }
}