01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15:
16: package org.griphyn.vdl.router;
17:
18: import org.griphyn.vdl.classes.*;
19: import org.griphyn.vdl.router.*;
20: import org.griphyn.vdl.util.Logging;
21: import java.io.*;
22:
23: public class ShowDiamondKeg {
24: public static void main(String[] args)
25: throws IllegalArgumentException, IOException {
26: // create debug output
27: Logging.instance().register("dag", System.err);
28: Logging.instance().register("state", System.err);
29: Logging.instance().register("route", System.err);
30:
31: // start timer
32: long start = System.currentTimeMillis();
33:
34: // create the diamond
35: boolean b = Boolean.getBoolean("diamond.condor");
36: Definitions diamond = org.griphyn.vdl.router.CreateDiamondKeg
37: .create(b);
38: if (args.length > 0
39: && args[0] != null
40: && (args[0].equalsIgnoreCase("vdlt") || args[0]
41: .startsWith("t")))
42: System.out.println(diamond.toString());
43: else {
44: BufferedWriter bw = new BufferedWriter(
45: new OutputStreamWriter(System.out));
46: diamond.toXML(bw, "");
47: bw.flush(); // IMPORTANT!
48: }
49: long diff = System.currentTimeMillis() - start;
50: System.err.println("execution time: " + diff + " ms");
51: System.exit(0);
52: }
53: }
|