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 |
ajm |
1.10 |
import uk.ac.ukc.iscream.clientinterface.*; |
8 |
tdb |
1.8 |
import uk.ac.ukc.iscream.util.*; |
9 |
tdb |
1.1 |
|
10 |
|
|
/** |
11 |
ajm |
1.11 |
* A root filter servant has an array |
12 |
|
|
* of client interfaces where data should be |
13 |
|
|
* piped. |
14 |
tdb |
1.1 |
* |
15 |
ajm |
1.11 |
* @author $Author: ajm4 $ |
16 |
tdb |
1.12 |
* @version $Id: RootFilterServant.java,v 1.11 2000/12/12 19:54:55 ajm4 Exp $ |
17 |
tdb |
1.1 |
*/ |
18 |
|
|
class RootFilterServant extends FilterPOA { |
19 |
|
|
|
20 |
|
|
//---FINAL ATTRIBUTES--- |
21 |
|
|
|
22 |
|
|
/** |
23 |
|
|
* The current CVS revision of this class |
24 |
|
|
*/ |
25 |
tdb |
1.12 |
public final String REVISION = "$Revision: 1.11 $"; |
26 |
tdb |
1.1 |
|
27 |
|
|
//---STATIC METHODS--- |
28 |
|
|
|
29 |
|
|
//---CONSTRUCTORS--- |
30 |
|
|
|
31 |
|
|
/** |
32 |
|
|
* Creates a new RootFilter. |
33 |
|
|
* |
34 |
tdb |
1.12 |
* @param queue a Queue to use |
35 |
tdb |
1.1 |
*/ |
36 |
tdb |
1.12 |
public RootFilterServant(Queue queue) { |
37 |
|
|
_queue = queue; |
38 |
ajm |
1.11 |
_logger.write(toString(), Logger.SYSINIT, "created"); |
39 |
tdb |
1.1 |
} |
40 |
|
|
|
41 |
|
|
//---PUBLIC METHODS--- |
42 |
|
|
|
43 |
|
|
/** |
44 |
|
|
* Method to receive a string over corba. |
45 |
|
|
* |
46 |
tdb |
1.12 |
* @param xml the String of XML to send on |
47 |
tdb |
1.1 |
*/ |
48 |
|
|
public void receiveXML(String xml) { |
49 |
tdb |
1.12 |
_queue.add(xml); |
50 |
tdb |
1.3 |
} |
51 |
|
|
|
52 |
tdb |
1.1 |
/** |
53 |
|
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
54 |
|
|
* method to provide clean logging (every class should have this). |
55 |
|
|
* |
56 |
ajm |
1.11 |
* This uses the uk.ac.ukc.iscream.util.NameFormat class |
57 |
|
|
* to format the toString() |
58 |
|
|
* |
59 |
tdb |
1.1 |
* @return the name of this class and its CVS revision |
60 |
|
|
*/ |
61 |
|
|
public String toString() { |
62 |
ajm |
1.11 |
return FormatName.getName( |
63 |
|
|
_name, |
64 |
|
|
getClass().getName(), |
65 |
|
|
REVISION); |
66 |
tdb |
1.1 |
} |
67 |
|
|
|
68 |
|
|
//---PRIVATE METHODS--- |
69 |
|
|
|
70 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
71 |
|
|
|
72 |
ajm |
1.11 |
public String getUDPPort() { |
73 |
|
|
return null; |
74 |
|
|
} |
75 |
|
|
|
76 |
|
|
public String getTCPPort() { |
77 |
|
|
return null; |
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
public String getHostName() { |
81 |
|
|
return null; |
82 |
|
|
} |
83 |
|
|
|
84 |
tdb |
1.1 |
//---ATTRIBUTES--- |
85 |
|
|
|
86 |
|
|
/** |
87 |
ajm |
1.11 |
* This is the friendly identifier of the |
88 |
|
|
* component this class is running in. |
89 |
|
|
* eg, a Filter may be called "filter1", |
90 |
|
|
* If this class does not have an owning |
91 |
|
|
* component, a name from the configuration |
92 |
|
|
* can be placed here. This name could also |
93 |
|
|
* be changed to null for utility classes. |
94 |
|
|
*/ |
95 |
|
|
private String _name = RootFilter.NAME; |
96 |
|
|
|
97 |
|
|
/** |
98 |
|
|
* This holds a reference to the |
99 |
|
|
* system logger that is being used. |
100 |
tdb |
1.1 |
*/ |
101 |
tdb |
1.8 |
private Logger _logger = ReferenceManager.getInstance().getLogger(); |
102 |
tdb |
1.1 |
|
103 |
|
|
/** |
104 |
tdb |
1.12 |
* A reference to the Queue being used. |
105 |
|
|
*/ |
106 |
|
|
private Queue _queue; |
107 |
tdb |
1.1 |
|
108 |
|
|
//---STATIC ATTRIBUTES--- |
109 |
|
|
|
110 |
|
|
} |