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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filter/UDPReader.java (file contents):
Revision 1.11 by ajm, Wed Dec 13 21:11:26 2000 UTC vs.
Revision 1.12 by tdb, Fri Jan 12 00:45:25 2001 UTC

# Line 38 | Line 38 | public class UDPReader extends Thread{
38       * It is normal to use this constructor in preference
39       * to any other in this class.
40       */
41 <    public UDPReader(int port, Filter parent){
41 >    public UDPReader(int port, Queue queue){
42          _port = port;
43 <        _parent = parent;
43 >        _queue = queue;
44      }
45  
46   //---PUBLIC METHODS---
# Line 68 | Line 68 | public class UDPReader extends Thread{
68          while (running){
69              try {
70  
71 <                    // receive request and pass on to the FilterThread.                
71 >                    // receive request and put it in the Queue              
72                  buf = new byte[packetSizeLimit];
73                  DatagramPacket packet = new DatagramPacket(buf, buf.length);
74                  socket.receive(packet);
75 <                FilterThread t = new FilterThread(packet, _parent);
76 <                t.start();
77 <
75 >                String xml = new String(packet.getData());
76 >                _queue.add(xml);
77              }
78              catch (IOException e) {
79                  _logger.write(this.toString(), Logger.WARNING, "This UDPReader thread has been shut down as an exception occured: "+e);
# Line 129 | Line 128 | public class UDPReader extends Thread{
128      int _port;
129      
130      /**
131 <     * The parent of this filter
131 >     * The Queue object
132       */
133 <    Filter _parent;    
133 >    Queue _queue;    
134  
135   //---STATIC ATTRIBUTES---
136  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines