The ScrollView class is the main class which gets started from the command line. It sets up LUA and handles the network processing.
- Author
- wanke.nosp@m.@goo.nosp@m.gle.c.nosp@m.om
Definition at line 32 of file ScrollView.java.
static void com.google.scrollview.ScrollView.addMessage |
( |
SVEvent |
e | ) |
|
|
inlinestatic |
Add a new message to the outgoing queue
Definition at line 60 of file ScrollView.java.
61 if (debugViewNetworkTraffic) {
62 System.out.println(
"(S->c) " + e.toString());
64 String str = e.toString();
67 byte [] utf8 = str.getBytes(
"UTF8");
68 out.write(utf8, 0, utf8.length);
69 }
catch (java.io.UnsupportedEncodingException ex) {
70 System.out.println(
"Oops... can't encode to UTF8... Exiting");
75 boolean error = out.checkError();
77 System.out.println(
"Connection error. Quitting ScrollView Server...");
static void com.google.scrollview.ScrollView.exit |
( |
| ) |
|
|
inlinestatic |
Called from the client to make the server exit.
Definition at line 358 of file ScrollView.java.
static void com.google.scrollview.ScrollView.main |
( |
String[] |
args | ) |
|
|
inlinestatic |
The main function. Sets up LUA and the server connection and then calls the IOLoop.
Definition at line 366 of file ScrollView.java.
367 if (args.length > 0) {
370 windows =
new ArrayList<SVWindow>(100);
371 intPattern = Pattern.compile(
"[0-9-][0-9]*");
372 floatPattern = Pattern.compile(
"[0-9-][0-9]*\\.[0-9]*");
376 ServerSocket serverSocket =
new ServerSocket(
SERVER_PORT);
377 System.out.println(
"Socket started on port " +
SERVER_PORT);
380 socket = serverSocket.accept();
381 System.out.println(
"Client connected");
384 out =
new PrintStream(socket.getOutputStream(),
true);
386 new BufferedReader(
new InputStreamReader(socket.getInputStream(),
388 }
catch (IOException e) {
static String com.google.scrollview.ScrollView.receiveMessage |
( |
| ) |
throws IOException |
|
inlinestatic |
Read one message from client (assuming there are any).
Definition at line 83 of file ScrollView.java.
BufferedReader com.google.scrollview.ScrollView.in |
|
static |
int com.google.scrollview.ScrollView.polylineScanned |
|
static |
int com.google.scrollview.ScrollView.polylineSize |
|
static |
float com.google.scrollview.ScrollView.polylineXCoords[] |
|
static |
float com.google.scrollview.ScrollView.polylineYCoords[] |
|
static |
int com.google.scrollview.ScrollView.SERVER_PORT = 8461 |
|
static |
The documentation for this class was generated from the following file: