1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.clientinterface; |
2 |
> |
package uk.org.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 |
< |
import java.util.LinkedList; |
9 |
< |
import java.util.Iterator; |
5 |
> |
import uk.org.iscream.core.*; |
6 |
> |
import uk.org.iscream.util.*; |
7 |
> |
import uk.org.iscream.componentmanager.*; |
8 |
|
|
9 |
|
/** |
10 |
< |
* A client interface servant |
11 |
< |
* Adds data to a Queue as it's received over CORBA. |
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 |
– |
* Currently it has limited client management facilities. |
16 |
– |
* |
15 |
|
* @author $Author$ |
16 |
|
* @version $Id$ |
17 |
|
*/ |
30 |
|
|
31 |
|
/** |
32 |
|
* Creates a new ClientInterfaceServant. |
33 |
+ |
* |
34 |
+ |
* @param packetSorter a reference to the PacketSorter object being used |
35 |
|
*/ |
36 |
< |
public ClientInterfaceServant(Queue queue) { |
37 |
< |
_queue = queue; |
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. |
44 |
> |
* Method to receive a string over CORBA. |
45 |
|
* |
46 |
< |
* @param xml the String of XML to print out |
46 |
> |
* @param xml the XML string to be queued for processing. |
47 |
|
*/ |
48 |
|
public void receiveXML(String xml) { |
49 |
|
_queue.add(xml); |
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 |
56 |
> |
* This uses the uk.org.iscream.util.NameFormat class |
57 |
|
* to format the toString() |
58 |
|
* |
59 |
|
* @return the name of this class and its CVS revision |
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--- |