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