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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/clientinterface/ClientInterfaceServant.java (file contents):
Revision 1.3 by ajm, Wed Dec 13 12:57:38 2000 UTC vs.
Revision 1.6 by tdb, Mon Jan 22 01:40:33 2001 UTC

# Line 4 | Line 4 | package uk.ac.ukc.iscream.clientinterface;
4   //---IMPORTS---
5   import uk.ac.ukc.iscream.core.*;
6   import uk.ac.ukc.iscream.util.*;
7 + import uk.ac.ukc.iscream.componentmanager.*;
8   import java.util.LinkedList;
9   import java.util.Iterator;
10  
# Line 47 | Line 48 | class ClientInterfaceServant extends ClientInterfacePO
48       * @param xml the String of XML to print out
49       */
50      public void receiveXML(String xml) {
50        _logger.write(toString(), Logger.DEBUG, "got data, passing to clients");
51          Iterator i = _clients.iterator();
52          while(i.hasNext()) {
53 <            ((ClientHandler) i.next()).receiveXML(xml);
53 >            ((ClientDataHandler) i.next()).receiveXML(xml);
54          }
55      }
56      
# Line 59 | Line 59 | class ClientInterfaceServant extends ClientInterfacePO
59       *
60       * @param newClient a reference to the client to add
61       */
62 <    public void register(ClientHandler newClient) {
62 >    public void register(ClientDataHandler newClient) {
63          _logger.write(toString(), Logger.SYSMSG, "registered client - " + newClient.toString());
64          _clients.add(newClient);
65 +    }
66 +    
67 +    /**
68 +     * Simply removes a client from a linked list
69 +     *
70 +     * @param client a reference to the client to be removed
71 +     */
72 +    public void deregister(ClientDataHandler client) {
73 +        _logger.write(toString(), Logger.SYSMSG, "deregistered client - " + client.toString());
74 +        _clients.remove(client);
75      }
76      
77      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines