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

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/ConnectionHandler.java (file contents):
Revision 1.3 by ajm, Mon Jan 22 03:07:32 2001 UTC vs.
Revision 1.4 by ajm, Mon Jan 22 04:09:35 2001 UTC

# Line 12 | Line 12 | public class ConnectionHandler extends Thread {
12      public static final int STARTDATA = 2;
13      public static final int STOPDATA = 3;
14      public static final int DISCONNECT = 4;
15 <
15 >    public static final int QUIT = 5;
16 >    
17      public ConnectionHandler(DataPanel data, Queue actionQueue) {
18          _data = data;
19          _actionQueue = actionQueue;
# Line 155 | Line 156 | public class ConnectionHandler extends Thread {
156                          SwingClient.addMessage("Control Link Error: " + e);
157                      }
158                      break;
159 <                        
159 >                case QUIT:
160 >                    SwingClient.addMessage("Exiting...");
161 >                    // stop data and control if data up
162 >                    if (_dataLink != null) {
163 >                        _actionQueue.add(new Integer(STOPDATA));
164 >                        _actionQueue.add(new Integer(DISCONNECT));
165 >                        _actionQueue.add(new Integer(QUIT));
166 >                    }                            
167 >                    // stop control
168 >                    if (_controlLink != null) {
169 >                        _actionQueue.add(new Integer(DISCONNECT));
170 >                        _actionQueue.add(new Integer(QUIT));
171 >                    }
172 >                    SwingClient.addMessage("Finished.");
173 >                    // go!
174 >                    System.exit(0);
175 >                    break;
176              }
177          }
178      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines