diff options
author | jestin | 2006-08-02 16:23:18 +0000 |
---|---|---|
committer | jestin | 2006-08-02 16:23:18 +0000 |
commit | 1c5d4da0b5be2f8532c96e9bc477c34e5687ae19 (patch) | |
tree | 069cc6edd570f95bbefd7b1260a2beb9d4cda29b /tests/StopStart.java | |
parent | f7d01e0337800bcb54fea096604457f900cbf976 (diff) | |
download | ivy-java-1c5d4da0b5be2f8532c96e9bc477c34e5687ae19.zip ivy-java-1c5d4da0b5be2f8532c96e9bc477c34e5687ae19.tar.gz ivy-java-1c5d4da0b5be2f8532c96e9bc477c34e5687ae19.tar.bz2 ivy-java-1c5d4da0b5be2f8532c96e9bc477c34e5687ae19.tar.xz |
ibid
Diffstat (limited to 'tests/StopStart.java')
-rw-r--r-- | tests/StopStart.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/StopStart.java b/tests/StopStart.java new file mode 100644 index 0000000..5962d27 --- /dev/null +++ b/tests/StopStart.java @@ -0,0 +1,30 @@ +import fr.dgac.ivy.* ; + +class StopStart { + + Ivy bus; + + public static void main(String[] args) throws IvyException { + String domain=Ivy.getDomainArgs("StopStartTest",args); + new StopStart(domain); + } + + public StopStart(String domain) throws IvyException { + int n=1; + bus = new Ivy("StopStart","StopStart ready", null); + System.out.println("--------------- starting bus"); + bus.start(domain); + System.out.println("--------------- sleeping "+n+" seconds"); + try { Thread.sleep(n*1000); } catch (InterruptedException ie) { } + System.out.println("--------------- stopping bus"); + bus.stop(); + System.out.println("--------------- restarting bus"); + bus.start(domain); + System.out.println("sleeping "+n+" seconds"); + try { Thread.sleep(n*1000); } catch (InterruptedException ie) { } + System.out.println("--------------- restopping bus"); + bus.stop(); + System.out.println("--------------- good bye, program should exit now"); + } + +} |