6 |
|
import java.net.*; |
7 |
|
import java.util.*; |
8 |
|
import uk.ac.ukc.iscream.core.*; |
9 |
+ |
import uk.ac.ukc.iscream.componentmanager.*; |
10 |
|
import uk.ac.ukc.iscream.filter.*; |
11 |
|
import uk.ac.ukc.iscream.util.*; |
12 |
|
|
51 |
|
public void run(){ |
52 |
|
// get a queue for ourselves |
53 |
|
int n = _queue.getQueue(); |
54 |
< |
// keep this out here, saves recreating the object |
54 |
> |
// keep these out here, saves recreating the object |
55 |
|
String xml = null; |
56 |
|
while(true) { |
57 |
|
// get a String of xml |
70 |
|
else { |
71 |
|
xml = xml.substring(0, xml.length()); |
72 |
|
} |
73 |
+ |
|
74 |
+ |
|
75 |
+ |
// Bundle the XML all on one line (saves space and simplifies |
76 |
+ |
// the protocol between clientinterface and client. |
77 |
+ |
StringTokenizer tokenizer = new StringTokenizer(new String(xml), "\n"); |
78 |
+ |
xml = ""; |
79 |
+ |
while (tokenizer.hasMoreTokens()) { |
80 |
+ |
xml += tokenizer.nextToken(); |
81 |
+ |
} |
82 |
+ |
|
83 |
|
|
84 |
|
// Use XMLPacketMaker to make an XMLPacket object. |
85 |
|
XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml); |