diff options
Diffstat (limited to 'tests/TestApi.java')
-rw-r--r-- | tests/TestApi.java | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/TestApi.java b/tests/TestApi.java index 3fa936a..00c2f29 100644 --- a/tests/TestApi.java +++ b/tests/TestApi.java @@ -93,32 +93,12 @@ class TestApi implements IvyMessageListener, IvyApplicationListener { System.out.println("Sender leaving the bus"); sbus.stop(); System.out.println("Sender has left the bus"); - new Killer(domain); - } - } - - class Killer implements IvyMessageListener { - private Ivy kbus; - public Killer(String domain) { - try { - System.out.println("Killer joining the bus"); - kbus = new Ivy("Killer","Killer ready", null); - kbus.bindMsg("^"+TestApiReadyMsg+"$",this); - kbus.start(domain); - } catch (IvyException ie) { - ie.printStackTrace(); - } - } - public void receive(IvyClient c,String[] args) { - c.sendDie("bye bye"); - System.out.println("Killer leaving the bus"); - kbus.stop(); - System.out.println("Killer has left the bus"); + new Killer(domain,("^"+TestApiReadyMsg+"$")); } } public static void main(String[] args) throws IvyException { - new TestApi(Ivy.getDomain(null)); + new TestApi(Ivy.getDomainArgs("TestApi",args)); } } |