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.9
Committed: Fri Mar 23 02:30:44 2001 UTC (23 years, 2 months ago) by ajm
Branch: MAIN
CVS Tags: PROJECT_COMPLETION
Changes since 1.8: +10 -4 lines
Log Message:
Javadoc'd the whole bally lot.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2 package uk.org.iscream.client;
3
4 //---IMPORTS---
5 import uk.org.iscream.componentmanager.*;
6 import uk.org.iscream.core.*;
7 import uk.org.iscream.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: tdb1 $
19 * @version $Id: ClientServant.java,v 1.8 2001/03/14 23:25:29 tdb1 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.8 $";
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.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 }