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.8
Committed: Tue Jan 23 16:56:31 2001 UTC (23 years, 4 months ago) by tdb
Branch: MAIN
Changes since 1.7: +4 -8 lines
Log Message:
Changed to support the new Protocol 1.1. This protocol supports selecting the
hosts a client wishes to monitor at connect time.

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 * A client interface servant
11 * Adds data to a Queue as it's received over CORBA.
12 *
13 * @author $Author: tdb1 $
14 * @version $Id: ClientInterfaceServant.java,v 1.7 2001/01/22 02:57:38 tdb1 Exp $
15 */
16 class ClientInterfaceServant extends ClientInterfacePOA {
17
18 //---FINAL ATTRIBUTES---
19
20 /**
21 * The current CVS revision of this class
22 */
23 public final String REVISION = "$Revision: 1.7 $";
24
25 //---STATIC METHODS---
26
27 //---CONSTRUCTORS---
28
29 /**
30 * Creates a new ClientInterfaceServant.
31 */
32 public ClientInterfaceServant(PacketSorter ps) {
33 _queue = ps.getQueue();
34 _logger.write(toString(), Logger.SYSINIT, "created");
35 }
36
37 //---PUBLIC METHODS---
38
39 /**
40 * Method to receive a string over corba.
41 *
42 * @param xml the String of XML to print out
43 */
44 public void receiveXML(String xml) {
45 _queue.add(xml);
46 }
47
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.NameFormat 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 = ClientInterfaceMain.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
87 private Queue _queue;
88
89 //---STATIC ATTRIBUTES---
90
91 }