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

Comparing projects/cms/source/util/uk/org/iscream/cms/util/XMLPacketMaker.java (file contents):
Revision 1.4 by tdb, Thu Nov 30 02:04:18 2000 UTC vs.
Revision 1.7 by ajm, Tue Dec 12 20:44:30 2000 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.xml;
2 > package uk.ac.ukc.iscream.util;
3  
4   //---IMPORTS---
5   import java.io.*;
# Line 11 | Line 11 | import javax.xml.parsers.ParserConfigurationException;
11   import javax.xml.parsers.SAXParser;
12  
13   import uk.ac.ukc.iscream.core.*;
14 import uk.ac.ukc.iscream.refman.*;
14  
15   /**
16   * XMLPacketMaker - Creates an XMLPacket object.
# Line 55 | Line 54 | public class XMLPacketMaker extends HandlerBase {
54  
55          }
56          catch (Exception e) {
57 +            _logger.write(this.toString(), Logger.WARNING, e.toString());
58              _logger.write(this.toString(), Logger.WARNING, "An invalid XML UDP packet has been detected: "+packet.printAll());
59              return null;
60          }
# Line 66 | Line 66 | public class XMLPacketMaker extends HandlerBase {
66       * Overrides the {@link java.lang.Object#toString() Object.toString()}
67       * method to provide clean logging (every class should have this).
68       *
69 +     * This uses the uk.ac.ukc.iscream.util.NameFormat class
70 +     * to format the toString()
71 +     *
72       * @return the name of this class and its CVS revision
73       */
74      public String toString() {
75 <        return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")";
75 >        return FormatName.getName(
76 >            _name,
77 >            getClass().getName(),
78 >            REVISION);
79      }
80  
81   //---PRIVATE METHODS---
# Line 78 | Line 84 | public class XMLPacketMaker extends HandlerBase {
84  
85   //---ATTRIBUTES---
86  
87 +    /**
88 +     * Holds the xml
89 +     */
90      String _xml;
91 <    Logger _logger = ReferenceManager.getInstance().getLogger();
91 >    
92 >    /**
93 >     * This holds a reference to the
94 >     * system logger that is being used.
95 >     */
96 >    private Logger _logger = ReferenceManager.getInstance().getLogger();
97 >    
98 >    /**
99 >     * This is the friendly identifier of the
100 >     * component this class is running in.
101 >     * eg, a Filter may be called "filter1",
102 >     * If this class does not have an owning
103 >     * component,  a name from the configuration
104 >     * can be placed here.  This name could also
105 >     * be changed to null for utility classes.
106 >     */
107 >    private String _name = null;
108  
109   //---STATIC ATTRIBUTES---
110  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines