ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/clientinterface/ClientInterfaceServant.java
Revision: 1.9
Committed: Sat Jan 27 23:30:40 2001 UTC (23 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.8: +16 -8 lines
Log Message:
All of these classes have been javadoc'd and commented.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2 package uk.ac.ukc.iscream.clientinterface;
3
4 //---IMPORTS---
5 import uk.ac.ukc.iscream.core.*;
6 import uk.ac.ukc.iscream.util.*;
7 import uk.ac.ukc.iscream.componentmanager.*;
8
9 /**
10 * This class, a servant, listens for incoming data sent to it
11 * using CORBA. This data is then queued in the PacketSorter.
12 * It does no processing of the data, and is only a seperate
13 * class to keep the CORBA stuff out of the PacketSorter.
14 *
15 * @author $Author: tdb1 $
16 * @version $Id: ClientInterfaceServant.java,v 1.8 2001/01/23 16:56:31 tdb1 Exp $
17 */
18 class ClientInterfaceServant extends ClientInterfacePOA {
19
20 //---FINAL ATTRIBUTES---
21
22 /**
23 * The current CVS revision of this class
24 */
25 public final String REVISION = "$Revision: 1.8 $";
26
27 //---STATIC METHODS---
28
29 //---CONSTRUCTORS---
30
31 /**
32 * Creates a new ClientInterfaceServant.
33 *
34 * @param packetSorter a reference to the PacketSorter object being used
35 */
36 public ClientInterfaceServant(PacketSorter packetSorter) {
37 _queue = packetSorter.getQueue();
38 _logger.write(toString(), Logger.SYSINIT, "created");
39 }
40
41 //---PUBLIC METHODS---
42
43 /**
44 * Method to receive a string over CORBA.
45 *
46 * @param xml the XML string to be queued for processing.
47 */
48 public void receiveXML(String xml) {
49 _queue.add(xml);
50 }
51
52 /**
53 * Overrides the {@link java.lang.Object#toString() Object.toString()}
54 * method to provide clean logging (every class should have this).
55 *
56 * This uses the uk.ac.ukc.iscream.util.NameFormat class
57 * to format the toString()
58 *
59 * @return the name of this class and its CVS revision
60 */
61 public String toString() {
62 return FormatName.getName(
63 _name,
64 getClass().getName(),
65 REVISION);
66 }
67
68 //---PRIVATE METHODS---
69
70 //---ACCESSOR/MUTATOR METHODS---
71
72 //---ATTRIBUTES---
73
74 /**
75 * This is the friendly identifier of the
76 * component this class is running in.
77 * eg, a Filter may be called "filter1",
78 * If this class does not have an owning
79 * component, a name from the configuration
80 * can be placed here. This name could also
81 * be changed to null for utility classes.
82 */
83 private String _name = ClientInterfaceMain.NAME;
84
85 /**
86 * This holds a reference to the
87 * system logger that is being used.
88 */
89 private Logger _logger = ReferenceManager.getInstance().getLogger();
90
91 /**
92 * A reference to the Queue we'll add data to. This is
93 * actually located in the PacketSorter.
94 */
95 private Queue _queue;
96
97 //---STATIC ATTRIBUTES---
98
99 }