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/FilterServant.java
Revision: 1.20
Committed: Sat May 18 18:16:01 2002 UTC (22 years ago) by tdb
Branch: MAIN
Changes since 1.19: +21 -2 lines
Log Message:
i-scream is now licensed under the GPL. I've added the GPL headers to every
source file, and put a full copy of the license in the appropriate places.
I think I've covered everything. This is going to be a mad commit ;)

File Contents

# User Rev Content
1 tdb 1.20 /*
2     * i-scream central monitoring system
3     * Copyright (C) 2000-2002 i-scream
4     *
5     * This program is free software; you can redistribute it and/or
6     * modify it under the terms of the GNU General Public License
7     * as published by the Free Software Foundation; either version 2
8     * of the License, or (at your option) any later version.
9     *
10     * This program is distributed in the hope that it will be useful,
11     * but WITHOUT ANY WARRANTY; without even the implied warranty of
12     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13     * GNU General Public License for more details.
14     *
15     * You should have received a copy of the GNU General Public License
16     * along with this program; if not, write to the Free Software
17     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18     */
19    
20 tdb 1.1 //---PACKAGE DECLARATION---
21 tdb 1.18 package uk.org.iscream.cms.server.filter;
22 tdb 1.1
23     //---IMPORTS---
24 tdb 1.18 import uk.org.iscream.cms.server.core.*;
25     import uk.org.iscream.cms.server.componentmanager.*;
26     import uk.org.iscream.cms.server.filter.*;
27     import uk.org.iscream.cms.server.util.*;
28 tdb 1.4 import java.net.InetAddress;
29 tdb 1.1
30     /**
31 ajm 1.11 * Passes inbound data from other Filters to a FilterThread
32 tdb 1.1 *
33 tdb 1.19 * @author $Author: tdb $
34 tdb 1.20 * @version $Id: FilterServant.java,v 1.19 2002/03/22 10:43:06 tdb Exp $
35 tdb 1.1 */
36     class FilterServant extends FilterPOA {
37    
38     //---FINAL ATTRIBUTES---
39    
40     /**
41     * The current CVS revision of this class
42     */
43 tdb 1.20 public final String REVISION = "$Revision: 1.19 $";
44 tdb 1.1
45     //---STATIC METHODS---
46    
47     //---CONSTRUCTORS---
48    
49     /**
50 tdb 1.14 * Creates a new FilterServant.
51 tdb 1.1 *
52 tdb 1.14 * @param queue the Queue this filter is using
53 tdb 1.1 */
54 tdb 1.19 public FilterServant(Queue queue) {
55 tdb 1.12 _queue = queue;
56 tdb 1.15 _logger.write(toString(), Logger.SYSINIT, "started");
57 tdb 1.1 }
58 tdb 1.9
59 tdb 1.1 //---PUBLIC METHODS---
60    
61     /**
62     * Method to receive a string over corba.
63     *
64 tdb 1.14 * @param xml the String of XML to queue
65 tdb 1.1 */
66     public void receiveXML(String xml) {
67 tdb 1.12 _queue.add(xml);
68 tdb 1.1 }
69    
70     /**
71     * Overrides the {@link java.lang.Object#toString() Object.toString()}
72     * method to provide clean logging (every class should have this).
73     *
74 tdb 1.18 * This uses the uk.org.iscream.cms.server.util.NameFormat class
75 ajm 1.11 * to format the toString()
76     *
77 tdb 1.1 * @return the name of this class and its CVS revision
78     */
79     public String toString() {
80 ajm 1.11 return FormatName.getName(
81     _name,
82     getClass().getName(),
83     REVISION);
84 tdb 1.1 }
85    
86     //---PRIVATE METHODS---
87    
88     //---ACCESSOR/MUTATOR METHODS---
89    
90     //---ATTRIBUTES---
91    
92     /**
93 ajm 1.11 * This is the friendly identifier of the
94     * component this class is running in.
95     * eg, a Filter may be called "filter1",
96     * If this class does not have an owning
97     * component, a name from the configuration
98     * can be placed here. This name could also
99     * be changed to null for utility classes.
100 tdb 1.1 */
101 ajm 1.11 private String _name = FilterMain.NAME;
102    
103 tdb 1.1 /**
104 ajm 1.11 * This holds a reference to the
105     * system logger that is being used.
106 tdb 1.1 */
107 ajm 1.11 private Logger _logger = ReferenceManager.getInstance().getLogger();
108 tdb 1.3
109     /**
110 tdb 1.12 * Our Queue object
111 tdb 1.3 */
112 tdb 1.12 private Queue _queue;
113 tdb 1.1
114     //---STATIC ATTRIBUTES---
115    
116     }