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 |
|
|
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 |
|
|
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 |
|
/** |