ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/client/javacli/JavaClientMain.java
Revision: 1.3
Committed: Tue May 21 16:47:11 2002 UTC (22 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.2: +4 -3 lines
Log Message:
Added URL to GPL headers.

File Contents

# User Rev Content
1 tdb 1.2 /*
2     * i-scream central monitoring system
3 tdb 1.3 * http://www.i-scream.org.uk
4 tdb 1.2 * Copyright (C) 2000-2002 i-scream
5     *
6     * This program is free software; you can redistribute it and/or
7     * modify it under the terms of the GNU General Public License
8     * as published by the Free Software Foundation; either version 2
9     * of the License, or (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19     */
20    
21 pjm2 1.1 //---PACKAGE DECLARATION---
22    
23     //---IMPORTS---
24    
25     import java.io.*;
26    
27     /**
28     * JavaClientMain
29     *
30 tdb 1.3 * @author $Author: tdb $
31     * @version $Id: JavaClientMain.java,v 1.2 2002/05/18 18:15:56 tdb Exp $
32 pjm2 1.1 */
33     public class JavaClientMain {
34    
35     //---FINAL ATTRIBUTES---
36    
37     /**
38     * The current CVS revision of this class
39     */
40 tdb 1.3 public final String REVISION = "$Revision: 1.2 $";
41 pjm2 1.1
42     //---STATIC METHODS---
43    
44     //---CONSTRUCTORS---
45    
46     //---PUBLIC METHODS---
47    
48     public static void main(String[] args) {
49    
50     if (args.length != 2) {
51     System.out.println("Usage: java JavaClientMain servername port");
52     System.exit(1);
53     }
54    
55     String serverName = args[0];
56     int serverPort = 0;
57     try {
58     serverPort = Integer.parseInt(args[1]);
59     }
60     catch (Exception e){
61     System.out.println("Unrecognised port number");
62     }
63    
64     InputStream nothing = null;
65     System.setIn(nothing);
66    
67     TerminalScreen screen = new TerminalScreen();
68     screen.clear();
69     screen.gotoxy(34, 10);
70     screen.print(" i - s c r e a m ", TerminalScreen.BOLD, TerminalScreen.BLACK_BG);
71     screen.gotoxy(27, 12);
72     screen.print("Central Monitoring System Client", TerminalScreen.BLUE);
73     screen.gotoxy(32,13);
74     screen.print("Unix/Linux version 1.0");
75    
76     // Show intro screen for 2 seconds.
77     try {
78     Thread.sleep(2000);
79     }
80     catch (InterruptedException e) {
81     // What a carry on.
82     }
83    
84     screen.clear();
85    
86     XMLStreamReaderThread reader = new XMLStreamReaderThread(serverName, serverPort, screen);
87     reader.start();
88    
89     // Handle some keypresses and things here.
90    
91     }
92    
93     //---PRIVATE METHODS---
94    
95     //---ACCESSOR/MUTATOR METHODS---
96    
97     //---ATTRIBUTES---
98    
99     //---STATIC ATTRIBUTES---
100    
101     }