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: package org.griphyn.cPlanner.common;
16:
17: import org.griphyn.cPlanner.common.TPT;
18:
19: /**
20: * Client for testing the TPT class.
21: *
22: * @author Karan Vahi
23: * @version $Revision: 50 $
24: */
25:
26: public class TestTPT {
27: public static void main(String[] args) {
28: TPT tpt = new TPT();
29: //build the TPT map
30: tpt.buildState();
31: //print it out
32: tpt.print();
33:
34: System.out.println(tpt.stageInThirdParty("X"));
35: System.out.println(tpt.interThirdParty("X"));
36: System.out.println(tpt.stageOutThirdParty("X"));
37:
38: String url = "file:///gpfs-wan/karan.txt";
39: System.out.println("Hostname is " + Utility.getHostName(url));
40: try {
41: System.out.println("Java hostanme is "
42: + new java.net.URL(url).getHost());
43: } catch (Exception e) {
44: }
45:
46: System.out.println("Mount point is "
47: + Utility.getAbsolutePath(url));
48: }
49:
50: }
|