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
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/ClientServant.java (file contents):
Revision 1.6 by tdb, Wed Feb 21 22:48:20 2001 UTC vs.
Revision 1.11 by tdb, Sat May 18 18:16:00 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * Copyright (C) 2000-2002 i-scream
4 + *
5 + * This program is free software; you can redistribute it and/or
6 + * modify it under the terms of the GNU General Public License
7 + * as published by the Free Software Foundation; either version 2
8 + * of the License, or (at your option) any later version.
9 + *
10 + * This program is distributed in the hope that it will be useful,
11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 + * GNU General Public License for more details.
14 + *
15 + * You should have received a copy of the GNU General Public License
16 + * along with this program; if not, write to the Free Software
17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 + */
19 +
20   //---PACKAGE DECLARATION---
21 < package uk.ac.ukc.iscream.client;
21 > package uk.org.iscream.cms.server.client;
22  
23   //---IMPORTS---
24 < import uk.ac.ukc.iscream.componentmanager.*;
25 < import uk.ac.ukc.iscream.core.*;
26 < import uk.ac.ukc.iscream.util.*;
24 > import uk.org.iscream.cms.server.componentmanager.*;
25 > import uk.org.iscream.cms.server.core.*;
26 > import uk.org.iscream.cms.server.util.*;
27  
28   /**
29   * A servant for the LocalClient.
30 + * This represents the Client interface for CORBA
31 + * clients connecting to the i-scream system on the ClientInterface.
32   *
33 + * The i-scream ClientInterface pumps data over CORBA into the
34 + * queue, using the recieveXML method.  The MonitorManager
35 + * then handles pulling the data out of this queue.
36 + *
37   * @author  $Author$
38   * @version $Id$
39   */
# Line 24 | Line 49 | class ClientServant extends ClientPOA {
49   //---STATIC METHODS---
50  
51   //---CONSTRUCTORS---
52 +    
53 +    /**
54 +     * Construct a new ClientServant, with a given Queue.
55 +     *
56 +     * @param queue The Queue that will link this class to the MonitorManager
57 +     */
58 +    public ClientServant(Queue queue) {
59 +        _queue = queue;
60 +    }
61  
62   //---PUBLIC METHODS---
63      
64      /**
65 <     * This should deal with the data... :)
65 >     * Adds the inbound data to our queue when the CORBA method is called.
66       *
67       * @param xml The String of XML data
68       */
69      public void receiveXML(String xml) {
70 <        // queue the xml?
37 <        //XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml);
38 <        //XMLPacket packet = xmlPacketMaker.createXMLPacket();
39 <        // deal with the packet here, somehow, maybe...
70 >        _queue.add(xml);
71      }
72  
73      /**
74       * Overrides the {@link java.lang.Object#toString() Object.toString()}
75       * method to provide clean logging (every class should have this).
76       *
77 <     * This uses the uk.ac.ukc.iscream.util.FormatName class
77 >     * This uses the uk.org.iscream.cms.server.util.FormatName class
78       * to format the toString()
79       *
80       * @return the name of this class and its CVS revision
# Line 77 | Line 108 | class ClientServant extends ClientPOA {
108       * system logger that is being used.
109       */
110      private Logger _logger = ReferenceManager.getInstance().getLogger();
111 +
112 +    /**
113 +     * A reference to our Queue to place the inbond data into.
114 +     */
115 +    private Queue _queue;
116  
117   //---STATIC ATTRIBUTES---
118  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines