ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/DataReader.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/DataReader.java (file contents):
Revision 1.11 by ajm, Thu Mar 15 01:05:46 2001 UTC vs.
Revision 1.12 by ajm, Fri Mar 23 03:58:26 2001 UTC

# Line 32 | Line 32 | public class DataReader extends Thread {
32       *
33       * @param inBound the BufferedReader this class should use
34       * @param dataQueue the queue new data should be placed on
35 +     * @param ch the connection handler in use
36       */
37 <    public DataReader(BufferedReader inBound, Queue dataQueue) {
37 >    public DataReader(BufferedReader inBound, Queue dataQueue, ConnectionHandler ch) {
38 >        _ch = ch;
39          _inBound = inBound;
40          _dataQueue = dataQueue;
41      }
# Line 45 | Line 47 | public class DataReader extends Thread {
47       * It does this until either there is a problem
48       * or it is told to stop.
49       *
50 +     * If there is a problem it calls shutdownLinks in the
51 +     * ConnectionHandler.
52 +     *
53       * Any data it reads it converts to XML and then
54       * adds to its queue.
55       */
# Line 67 | Line 72 | public class DataReader extends Thread {
72          } catch (IOException e) {
73              Conient.addMessage("WARNING{data reader}: inbound data stopped - "+e);
74              _running = false;
75 +            // tell the ConnectionHandler to shut down the links
76 +            _ch.shutdownLinks();
77          }
78      }
79  
# Line 87 | Line 94 | public class DataReader extends Thread {
94      /**
95       * The reader we are reading from.
96       */
97 <    BufferedReader _inBound;
97 >    private BufferedReader _inBound;
98      
99      /**
100       * The Queue we place data on.
101       */
102 <    Queue _dataQueue;
102 >    private Queue _dataQueue;
103      
104      /**
105       * The state of this thread.
106       */
107 <    boolean _running = true;
107 >    private boolean _running = true;
108 >    
109 >    /**
110 >     * A reference to the ConnectionHandler in use
111 >     */
112 >    private ConnectionHandler _ch;
113      
114   //---STATIC ATTRIBUTES---
115  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines