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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilterServant.java (file contents):
Revision 1.9 by tdb, Thu Nov 30 02:48:15 2000 UTC vs.
Revision 1.17 by tdb, Fri Mar 22 10:43:06 2002 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.rootfilter;
2 > package uk.org.iscream.cms.server.rootfilter;
3  
4   //---IMPORTS---
5 < import uk.ac.ukc.iscream.core.*;
6 < import uk.ac.ukc.iscream.filter.*;
7 < import uk.ac.ukc.iscream.util.*;
5 > import uk.org.iscream.cms.server.core.*;
6 > import uk.org.iscream.cms.server.componentmanager.*;
7 > import uk.org.iscream.cms.server.filter.*;
8 > import uk.org.iscream.cms.server.clientinterface.*;
9 > import uk.org.iscream.cms.server.util.*;
10  
11   /**
12 < * A test RootFilterServant, just prints it out.
12 > * A root filter servant has an array
13 > * of client interfaces where data should be
14 > * piped.
15   *
16   * @author  $Author$
17   * @version $Id$
# Line 28 | Line 32 | class RootFilterServant extends FilterPOA {
32      /**
33       * Creates a new RootFilter.
34       *
35 <     * @param logger a Logger to use
35 >     * @param queue a Queue to use
36       */
37 <    public RootFilterServant() {
38 <        _logger.write(this.toString(), Logger.DEBUG, "created");
37 >    public RootFilterServant(Queue queue) {
38 >        _queue = queue;
39 >        _logger.write(toString(), Logger.SYSINIT, "created");
40      }
41  
42   //---PUBLIC METHODS---
# Line 39 | Line 44 | class RootFilterServant extends FilterPOA {
44      /**
45       * Method to receive a string over corba.
46       *
47 <     * @param xml the String of XML to print out
47 >     * @param xml the String of XML to send on
48       */
49      public void receiveXML(String xml) {
50 <        RootFilterThread t = new RootFilterThread(xml);
46 <        t.start();
50 >        _queue.add(xml);
51      }
52      
49    public String getUDPPort() {
50        return null;
51    }
52    
53    public String getTCPPort() {
54        return null;
55    }
56    
57    public String getHostName() {
58        return null;
59    }
60    
53      /**
54       * Overrides the {@link java.lang.Object#toString() Object.toString()}
55       * method to provide clean logging (every class should have this).
56       *
57 +     * This uses the uk.org.iscream.cms.server.util.NameFormat class
58 +     * to format the toString()
59 +     *
60       * @return the name of this class and its CVS revision
61       */
62      public String toString() {
63 <        return this.getClass().getName() + "{" + _name + "}(" + REVISION.substring(11, REVISION.length() - 2) + ")";
63 >        return FormatName.getName(
64 >            _name,
65 >            getClass().getName(),
66 >            REVISION);
67      }
68  
69   //---PRIVATE METHODS---
# Line 75 | Line 73 | class RootFilterServant extends FilterPOA {
73   //---ATTRIBUTES---
74  
75      /**
76 <     * Reference to a Logger
76 >     * This is the friendly identifier of the
77 >     * component this class is running in.
78 >     * eg, a Filter may be called "filter1",
79 >     * If this class does not have an owning
80 >     * component,  a name from the configuration
81 >     * can be placed here.  This name could also
82 >     * be changed to null for utility classes.
83       */
84 +    private String _name = RootFilter.NAME;
85 +
86 +    /**
87 +     * This holds a reference to the
88 +     * system logger that is being used.
89 +     */
90      private Logger _logger = ReferenceManager.getInstance().getLogger();
91      
92      /**
93 <     * Our name
93 >     * A reference to the Queue being used.
94       */
95 <    private String _name = ReferenceManager.getInstance().getName();
95 >    private Queue _queue;
96      
97   //---STATIC ATTRIBUTES---
98  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines