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 RootFilterServant, just prints it out. |
9 |
|
|
* |
10 |
tdb |
1.2 |
* @author $Author: tdb1 $ |
11 |
tdb |
1.5 |
* @version $Id: RootFilterServant.java,v 1.4 2000/11/24 13:04:36 tdb1 Exp $ |
12 |
tdb |
1.1 |
*/ |
13 |
|
|
class RootFilterServant extends FilterPOA { |
14 |
|
|
|
15 |
|
|
//---FINAL ATTRIBUTES--- |
16 |
|
|
|
17 |
|
|
/** |
18 |
|
|
* The current CVS revision of this class |
19 |
|
|
*/ |
20 |
tdb |
1.5 |
public final String REVISION = "$Revision: 1.4 $"; |
21 |
tdb |
1.1 |
|
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 |
tdb |
1.2 |
_logRef.write(this.toString(), Logger.DEBUG, "created"); |
35 |
tdb |
1.1 |
} |
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.5 |
RootFilterThread t = new RootFilterThread(xml, _logRef); |
47 |
tdb |
1.4 |
t.start(); |
48 |
tdb |
1.3 |
} |
49 |
|
|
|
50 |
|
|
public String getUDPPort() { |
51 |
|
|
return null; |
52 |
|
|
} |
53 |
|
|
|
54 |
|
|
public String getTCPPort() { |
55 |
|
|
return null; |
56 |
|
|
} |
57 |
|
|
|
58 |
|
|
public String getHostName() { |
59 |
|
|
return null; |
60 |
tdb |
1.1 |
} |
61 |
|
|
|
62 |
|
|
/** |
63 |
|
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
64 |
|
|
* method to provide clean logging (every class should have this). |
65 |
|
|
* |
66 |
|
|
* @return the name of this class and its CVS revision |
67 |
|
|
*/ |
68 |
|
|
public String toString() { |
69 |
|
|
return this.getClass().getName() + "{" + _name + "}(" + REVISION.substring(11, REVISION.length() - 2) + ")"; |
70 |
|
|
} |
71 |
|
|
|
72 |
|
|
//---PRIVATE METHODS--- |
73 |
|
|
|
74 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
75 |
|
|
|
76 |
|
|
//---ATTRIBUTES--- |
77 |
|
|
|
78 |
|
|
/** |
79 |
|
|
* Reference to a Logger |
80 |
|
|
*/ |
81 |
|
|
private Logger _logRef; |
82 |
|
|
|
83 |
|
|
/** |
84 |
|
|
* Our name |
85 |
|
|
*/ |
86 |
|
|
private String _name; |
87 |
|
|
|
88 |
|
|
//---STATIC ATTRIBUTES--- |
89 |
|
|
|
90 |
|
|
} |