version 1.1.1.1, 1999/11/02 11:52:34 |
version 1.2, 1999/11/02 13:09:19 |
|
|
|
/** |
|
* $OpenXM$ |
|
*/ |
|
|
import JP.ac.kobe_u.math.tam.OpenXM.*; |
import JP.ac.kobe_u.math.tam.OpenXM.*; |
import java.util.Stack; |
import java.util.Stack; |
import java.io.*; |
import java.io.*; |
Line 131 class OMproxy implements Runnable{ |
|
Line 135 class OMproxy implements Runnable{ |
|
return ret; |
return ret; |
} |
} |
|
|
|
private static String usage(){ |
|
String ret = ""; |
|
|
|
ret += "usage\t: java OMproxy [options]\n"; |
|
ret += "options\t:\n"; |
|
ret += "\t -h \t show this message\n"; |
|
ret += "\t -host hostname \t (default localhost)\n"; |
|
ret += "\t -data port \t (default 1300)\n"; |
|
ret += "\t -control port \t (default 1200)\n"; |
|
|
|
return ret; |
|
} |
|
|
public static void main(String argv[]){ |
public static void main(String argv[]){ |
String host = "localhost"; |
String host = "localhost"; |
int DataPort = 1300, ControlPort = 1200; |
int DataPort = 1300, ControlPort = 1200; |
|
|
for(int i=0;i<argv.length;i++){ |
for(int i=0;i<argv.length;i++){ |
if(argv[i].equals("-h")){ |
if(argv[i].equals("-h")){ |
System.out.println(""); |
System.out.print(usage()); |
System.exit(0); |
System.exit(0); |
}else if(argv[i].equals("-host")){ |
}else if(argv[i].equals("-host")){ |
host = argv[++i]; |
host = argv[++i]; |
Line 146 class OMproxy implements Runnable{ |
|
Line 163 class OMproxy implements Runnable{ |
|
}else if(argv[i].equals("-control")){ |
}else if(argv[i].equals("-control")){ |
ControlPort = Integer.valueOf(argv[++i]).intValue(); |
ControlPort = Integer.valueOf(argv[++i]).intValue(); |
}else{ |
}else{ |
System.err.println("unknown option :"+ argv[i]); |
System.err.println("unknown option : "+ argv[i]); |
|
System.err.print(usage()); |
System.exit(1); |
System.exit(1); |
} |
} |
} |
} |
|
|
System.out.println("host(ctrl,data): "+ host |
System.out.println("host(ctrl,data): "+ host |
+"("+ ControlPort +","+ DataPort +")"); |
+"("+ ControlPort +","+ DataPort +")"); |
|
|