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/FilterThread.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterThread.java (file contents):
Revision 1.7 by tdb, Mon Nov 27 21:47:13 2000 UTC vs.
Revision 1.8 by tdb, Wed Nov 29 19:26:00 2000 UTC

# Line 1 | Line 1
1 + //---PACKAGE DECLARATION---
2 + package uk.ac.ukc.iscream.filter;
3 +
4 + //---IMPORTS---
5   import java.io.*;
6   import java.net.*;
7   import java.util.*;
8   import uk.ac.ukc.iscream.core.*;
9   import uk.ac.ukc.iscream.filter.*;
10 + import uk.ac.ukc.iscream.xml.*;
11  
12 < // Handle an incoming UDP packet as a separate thread.
12 > /**
13 > * Handle an incoming UDP packet as a separate thread.
14 > *
15 > * @author  $Author$
16 > * @version $Id$
17 > */
18   public class FilterThread extends Thread{
19  
20 + //---FINAL ATTRIBUTES---
21 +
22 +    /**
23 +     * The current CVS revision of this class
24 +     */
25 +    public final String REVISION = "$Revision$";
26 +    
27 + //---STATIC METHODS---
28 +
29 + //---CONSTRUCTORS---
30 +
31      // Class constructor. Obtains the byte[] from a DatagramPacket.
32      public FilterThread(DatagramPacket packet, Filter parent, Logger logger){
33          this.parent = parent;
# Line 19 | Line 40 | public class FilterThread extends Thread{
40          this.parent = parent;
41          this.rawPacket = xml.getBytes();
42      }
43 <    
43 >
44 > //---PUBLIC METHODS---
45 >
46      public void run(){
47  
48          // Get a string without any null characters in it.
# Line 47 | Line 70 | public class FilterThread extends Thread{
70          parent.receiveXML(xml);
71      
72      }
73 <    
73 >
74 >    /**
75 >     * Overrides the {@link java.lang.Object#toString() Object.toString()}
76 >     * method to provide clean logging (every class should have this).
77 >     *
78 >     * @return the name of this class and its CVS revision
79 >     */
80 >    public String toString() {
81 >        return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")";
82 >    }
83 >
84 > //---PRIVATE METHODS---
85 >
86 > //---ACCESSOR/MUTATOR METHODS---
87 >
88 > //---ATTRIBUTES---
89 >
90      Filter parent;
91      byte[] rawPacket;
92      Logger logger;
93 +
94 + //---STATIC ATTRIBUTES---
95 +
96   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines