1 |
tdb |
1.1 |
//---PACKAGE DECLARATION--- |
2 |
|
|
package uk.ac.ukc.iscream.client.monitors; |
3 |
|
|
|
4 |
|
|
//---IMPORTS--- |
5 |
|
|
import uk.ac.ukc.iscream.client.*; |
6 |
|
|
import uk.ac.ukc.iscream.core.*; |
7 |
|
|
import uk.ac.ukc.iscream.util.*; |
8 |
|
|
import uk.ac.ukc.iscream.componentmanager.*; |
9 |
|
|
|
10 |
|
|
/** |
11 |
|
|
* Provides a full XMLPacket feed to the WebFeeder |
12 |
|
|
* |
13 |
|
|
* @author $Author$ |
14 |
|
|
* @version $Id$ |
15 |
|
|
*/ |
16 |
|
|
public class WebFeeder__Monitor implements PluginMonitor { |
17 |
|
|
|
18 |
|
|
//---FINAL ATTRIBUTES--- |
19 |
|
|
|
20 |
|
|
/** |
21 |
|
|
* The current CVS revision of this class |
22 |
|
|
*/ |
23 |
|
|
public static final String REVISION = "$Revision: 1.1 $"; |
24 |
|
|
|
25 |
|
|
public static final String DESC = "Provides a feed to WebFeeder"; |
26 |
|
|
|
27 |
|
|
//---STATIC METHODS--- |
28 |
|
|
|
29 |
|
|
//---CONSTRUCTORS--- |
30 |
|
|
|
31 |
|
|
public WebFeeder__Monitor() { |
32 |
|
|
_webFeeder = WebFeeder.getInstance(); |
33 |
|
|
} |
34 |
|
|
|
35 |
|
|
//---PUBLIC METHODS--- |
36 |
|
|
|
37 |
|
|
public void analysePacket(XMLPacket packet) { |
38 |
|
|
_webFeeder.receiveXMLPacket(packet); |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
public String getDescription() { |
42 |
|
|
return DESC; |
43 |
|
|
} |
44 |
|
|
|
45 |
|
|
/** |
46 |
|
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
47 |
|
|
* method to provide clean logging (every class should have this). |
48 |
|
|
* |
49 |
|
|
* This uses the uk.ac.ukc.iscream.util.FormatName class |
50 |
|
|
* to format the toString() |
51 |
|
|
* |
52 |
|
|
* @return the name of this class and its CVS revision |
53 |
|
|
*/ |
54 |
|
|
public String toString() { |
55 |
|
|
return FormatName.getName( |
56 |
|
|
_name, |
57 |
|
|
getClass().getName(), |
58 |
|
|
REVISION); |
59 |
|
|
} |
60 |
|
|
|
61 |
|
|
//---PRIVATE METHODS--- |
62 |
|
|
|
63 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
64 |
|
|
|
65 |
|
|
//---ATTRIBUTES--- |
66 |
|
|
|
67 |
|
|
// reference to the WebFeeder |
68 |
|
|
WebFeeder _webFeeder; |
69 |
|
|
|
70 |
|
|
/** |
71 |
|
|
* This is the friendly identifier of the |
72 |
|
|
* component this class is running in. |
73 |
|
|
* eg, a Filter may be called "filter1", |
74 |
|
|
* If this class does not have an owning |
75 |
|
|
* component, a name from the configuration |
76 |
|
|
* can be placed here. This name could also |
77 |
|
|
* be changed to null for utility classes. |
78 |
|
|
*/ |
79 |
|
|
private String _name = "WebFeeder"; |
80 |
|
|
|
81 |
|
|
/** |
82 |
|
|
* This holds a reference to the |
83 |
|
|
* system logger that is being used. |
84 |
|
|
*/ |
85 |
|
|
private Logger _logger = ReferenceManager.getInstance().getLogger(); |
86 |
|
|
|
87 |
|
|
//---STATIC ATTRIBUTES--- |
88 |
|
|
|
89 |
|
|
} |