1 |
tdb |
1.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 FilterServant, just prints it out. |
9 |
|
|
* |
10 |
tdb |
1.2 |
* @author $Author: tdb1 $ |
11 |
|
|
* @version $Id: FilterServant.java,v 1.1 2000/11/21 21:07:45 tdb1 Exp $ |
12 |
tdb |
1.1 |
*/ |
13 |
|
|
class FilterServant 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 Filter. |
28 |
|
|
* |
29 |
|
|
* @param logger a Logger to use |
30 |
|
|
*/ |
31 |
|
|
public FilterServant(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 |
tdb |
1.2 |
//UDPReaderThread t = new UDPReaderThread(); |
47 |
|
|
//t.run(xml); |
48 |
tdb |
1.1 |
} |
49 |
|
|
|
50 |
|
|
/** |
51 |
|
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
52 |
|
|
* method to provide clean logging (every class should have this). |
53 |
|
|
* |
54 |
|
|
* @return the name of this class and its CVS revision |
55 |
|
|
*/ |
56 |
|
|
public String toString() { |
57 |
|
|
return this.getClass().getName() + "{" + _name + "}(" + REVISION.substring(11, REVISION.length() - 2) + ")"; |
58 |
|
|
} |
59 |
|
|
|
60 |
|
|
//---PRIVATE METHODS--- |
61 |
|
|
|
62 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
63 |
|
|
|
64 |
|
|
//---ATTRIBUTES--- |
65 |
|
|
|
66 |
|
|
/** |
67 |
|
|
* Reference to a Logger |
68 |
|
|
*/ |
69 |
|
|
private Logger _logRef; |
70 |
|
|
|
71 |
|
|
/** |
72 |
|
|
* Our name |
73 |
|
|
*/ |
74 |
|
|
private String _name; |
75 |
|
|
|
76 |
|
|
//---STATIC ATTRIBUTES--- |
77 |
|
|
|
78 |
|
|
} |