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