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
Revision: 1.1
Committed: Tue Nov 21 21:11:25 2000 UTC (23 years, 6 months ago) by tdb
Branch: MAIN
Log Message:
Servant for the Root Filter. Currently just prints out the data it receives :)

File Contents

# Content
1 //---PACKAGE DECLARATION---
2
3 //---IMPORTS---
4 import uk.ac.ukc.iscream.core.*;
5 import uk.ac.ukc.iscream.filter.*;
6
7 /**
8 * A test RootFilterServant, just prints it out.
9 *
10 * @author $Author$
11 * @version $Id$
12 */
13 class RootFilterServant extends FilterPOA {
14
15 //---FINAL ATTRIBUTES---
16
17 /**
18 * The current CVS revision of this class
19 */
20 public final String REVISION = "$Revision: 1.1 $";
21
22 //---STATIC METHODS---
23
24 //---CONSTRUCTORS---
25
26 /**
27 * Creates a new RootFilter.
28 *
29 * @param logger a Logger to use
30 */
31 public RootFilterServant(Logger logger, String name) {
32 _logRef = logger;
33 _name = name;
34 _logRef.write(this.toString(), Logger.SYSINIT, "created");
35 }
36
37 //---PUBLIC METHODS---
38
39 /**
40 * Method to receive a string over corba.
41 *
42 * @param xml the String of XML to print out
43 */
44 public void receiveXML(String xml) {
45 _logRef.write(this.toString(), Logger.SYSMSG, "received XML: "+xml);
46 }
47
48 /**
49 * Overrides the {@link java.lang.Object#toString() Object.toString()}
50 * method to provide clean logging (every class should have this).
51 *
52 * @return the name of this class and its CVS revision
53 */
54 public String toString() {
55 return this.getClass().getName() + "{" + _name + "}(" + REVISION.substring(11, REVISION.length() - 2) + ")";
56 }
57
58 //---PRIVATE METHODS---
59
60 //---ACCESSOR/MUTATOR METHODS---
61
62 //---ATTRIBUTES---
63
64 /**
65 * Reference to a Logger
66 */
67 private Logger _logRef;
68
69 /**
70 * Our name
71 */
72 private String _name;
73
74 //---STATIC ATTRIBUTES---
75
76 }