283 |
|
_dataInBound = new BufferedReader(new InputStreamReader(_dataLink.getInputStream())); |
284 |
|
_dataOutBound = new PrintWriter(_dataLink.getOutputStream()); |
285 |
|
Conient.setDataStatus("Connection Established - " + _server); |
286 |
+ |
// now we want to start reading the data in |
287 |
+ |
// so we start the appropriate components on their way |
288 |
+ |
// we create a queue to give to both the reader and the |
289 |
+ |
// displayer |
290 |
+ |
Queue theQueue = new Queue(); |
291 |
+ |
_dataReader = new DataReader(_dataInBound, theQueue); |
292 |
+ |
_data.setQueue(theQueue); |
293 |
+ |
_data.cleanUpTabs(); |
294 |
+ |
|
295 |
+ |
// start the data rocking |
296 |
+ |
new Thread(_data).start(); |
297 |
+ |
_dataReader.start(); |
298 |
+ |
// finished for us.... |
299 |
|
} catch (IOException e) { |
300 |
|
// print the error and tidy up what's left |
301 |
|
Conient.addMessage("ERROR{data link}: " + e); |
308 |
|
} |
309 |
|
Conient.setDataStatus("Disconnected"); |
310 |
|
} |
298 |
– |
// now we want to start reading the data in |
299 |
– |
// so we start the appropriate components on their way |
300 |
– |
// we create a queue to give to both the reader and the |
301 |
– |
// displayer |
302 |
– |
Queue theQueue = new Queue(); |
303 |
– |
_dataReader = new DataReader(_dataInBound, theQueue); |
304 |
– |
_data.setQueue(theQueue); |
305 |
– |
_data.cleanUpTabs(); |
306 |
– |
|
307 |
– |
// start the data rocking |
308 |
– |
new Thread(_data).start(); |
309 |
– |
_dataReader.start(); |
310 |
– |
// finished for us.... |
311 |
|
} |
312 |
|
} else { |
313 |
|
Conient.addMessage("WARNING{data link}: already established"); |