ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/ClientServant.java
Revision: 1.10
Committed: Tue May 29 17:02:34 2001 UTC (22 years, 11 months ago) by tdb
Branch: MAIN
Branch point for: SERVER_PIRCBOT
Changes since 1.9: +8 -8 lines
Log Message:
Major change in the java package naming. This has been held off for some time
now, but it really needed doing. The future packaging of all i-scream products
will be;

uk.org.iscream.<product>.<subpart>.*

In the case of the central monitoring system server this will be;

uk.org.iscream.cms.server.*

The whole server has been changed to follow this structure, and tested to a
smallish extent. Further changes in other parts of the CMS will follow.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2 package uk.org.iscream.cms.server.client;
3
4 //---IMPORTS---
5 import uk.org.iscream.cms.server.componentmanager.*;
6 import uk.org.iscream.cms.server.core.*;
7 import uk.org.iscream.cms.server.util.*;
8
9 /**
10 * A servant for the LocalClient.
11 * This represents the Client interface for CORBA
12 * clients connecting to the i-scream system on the ClientInterface.
13 *
14 * The i-scream ClientInterface pumps data over CORBA into the
15 * queue, using the recieveXML method. The MonitorManager
16 * then handles pulling the data out of this queue.
17 *
18 * @author $Author: ajm4 $
19 * @version $Id: ClientServant.java,v 1.9 2001/03/23 02:30:44 ajm4 Exp $
20 */
21 class ClientServant extends ClientPOA {
22
23 //---FINAL ATTRIBUTES---
24
25 /**
26 * The current CVS revision of this class
27 */
28 public static final String REVISION = "$Revision: 1.9 $";
29
30 //---STATIC METHODS---
31
32 //---CONSTRUCTORS---
33
34 /**
35 * Construct a new ClientServant, with a given Queue.
36 *
37 * @param queue The Queue that will link this class to the MonitorManager
38 */
39 public ClientServant(Queue queue) {
40 _queue = queue;
41 }
42
43 //---PUBLIC METHODS---
44
45 /**
46 * Adds the inbound data to our queue when the CORBA method is called.
47 *
48 * @param xml The String of XML data
49 */
50 public void receiveXML(String xml) {
51 _queue.add(xml);
52 }
53
54 /**
55 * Overrides the {@link java.lang.Object#toString() Object.toString()}
56 * method to provide clean logging (every class should have this).
57 *
58 * This uses the uk.org.iscream.cms.server.util.FormatName class
59 * to format the toString()
60 *
61 * @return the name of this class and its CVS revision
62 */
63 public String toString() {
64 return FormatName.getName(
65 _name,
66 getClass().getName(),
67 REVISION);
68 }
69
70 //---PRIVATE METHODS---
71
72 //---ACCESSOR/MUTATOR METHODS---
73
74 //---ATTRIBUTES---
75
76 /**
77 * This is the friendly identifier of the
78 * component this class is running in.
79 * eg, a Filter may be called "filter1",
80 * If this class does not have an owning
81 * component, a name from the configuration
82 * can be placed here. This name could also
83 * be changed to null for utility classes.
84 */
85 private String _name = ClientMain.NAME;
86
87 /**
88 * This holds a reference to the
89 * system logger that is being used.
90 */
91 private Logger _logger = ReferenceManager.getInstance().getLogger();
92
93 /**
94 * A reference to our Queue to place the inbond data into.
95 */
96 private Queue _queue;
97
98 //---STATIC ATTRIBUTES---
99
100 }