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.7
Committed: Tue Feb 27 01:02:01 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.6: +18 -7 lines
Log Message:
Now pumps all data into a Queue.

File Contents

# User Rev Content
1 tdb 1.6 //---PACKAGE DECLARATION---
2 tdb 1.1 package uk.ac.ukc.iscream.client;
3    
4 tdb 1.6 //---IMPORTS---
5     import uk.ac.ukc.iscream.componentmanager.*;
6     import uk.ac.ukc.iscream.core.*;
7 tdb 1.2 import uk.ac.ukc.iscream.util.*;
8 tdb 1.1
9 tdb 1.6 /**
10     * A servant for the LocalClient.
11     *
12 tdb 1.7 * @author $Author: tdb1 $
13     * @version $Id: ClientServant.java,v 1.6 2001/02/21 22:48:20 tdb1 Exp $
14 tdb 1.6 */
15 tdb 1.1 class ClientServant extends ClientPOA {
16 tdb 1.6
17     //---FINAL ATTRIBUTES---
18    
19     /**
20     * The current CVS revision of this class
21     */
22 tdb 1.7 public static final String REVISION = "$Revision: 1.6 $";
23 tdb 1.6
24     //---STATIC METHODS---
25    
26     //---CONSTRUCTORS---
27 tdb 1.7
28     /**
29     * Construct a new ClientServant, with a given Queue.
30     *
31     * @param queue The Queue that will link this class to the MonitorManager
32     */
33     public ClientServant(Queue queue) {
34     _queue = queue;
35     }
36 tdb 1.6
37     //---PUBLIC METHODS---
38    
39     /**
40     * This should deal with the data... :)
41     *
42     * @param xml The String of XML data
43     */
44 tdb 1.1 public void receiveXML(String xml) {
45 tdb 1.7 _queue.add(xml);
46 tdb 1.1 }
47 tdb 1.6
48     /**
49     * Overrides the {@link java.lang.Object#toString() Object.toString()}
50     * method to provide clean logging (every class should have this).
51     *
52     * This uses the uk.ac.ukc.iscream.util.FormatName class
53     * to format the toString()
54     *
55     * @return the name of this class and its CVS revision
56     */
57     public String toString() {
58     return FormatName.getName(
59     _name,
60     getClass().getName(),
61     REVISION);
62     }
63    
64     //---PRIVATE METHODS---
65    
66     //---ACCESSOR/MUTATOR METHODS---
67    
68     //---ATTRIBUTES---
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 = ClientMain.NAME;
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 tdb 1.7
87     /**
88     * A reference to our QUeue
89     */
90     private Queue _queue;
91 tdb 1.6
92     //---STATIC ATTRIBUTES---
93    
94 tdb 1.1 }