3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
|
import uk.ac.ukc.iscream.core.*; |
6 |
+ |
import uk.ac.ukc.iscream.componentmanager.*; |
7 |
|
import uk.ac.ukc.iscream.clientinterface.*; |
8 |
|
import uk.ac.ukc.iscream.util.*; |
9 |
|
|
37 |
|
public CIWrapper(ClientInterface destination, Queue queue){ |
38 |
|
_destination = destination; |
39 |
|
_queue = queue; |
40 |
+ |
_queueID = queue.getQueue(); |
41 |
|
} |
42 |
|
|
43 |
|
//---PUBLIC METHODS--- |
46 |
|
* start the thread and thus gets and sends data |
47 |
|
*/ |
48 |
|
public void run() { |
49 |
< |
int n = _queue.getQueue(); |
49 |
> |
String xml = null; |
50 |
|
while(true) { |
51 |
|
try { |
52 |
< |
String xml = _queue.get(n) |
52 |
> |
xml = (String) _queue.get(n); |
53 |
|
} |
54 |
|
catch (InvalidQueueException e) { |
55 |
|
_logger.write(toString(), Logger.ERROR, "Queue error: "+e); |
78 |
|
* A reference to a Queue object. |
79 |
|
*/ |
80 |
|
private Queue _queue; |
81 |
+ |
|
82 |
+ |
/** |
83 |
+ |
* Our Queue id. |
84 |
+ |
*/ |
85 |
+ |
private int _queueID; |
86 |
|
|
87 |
|
/** |
88 |
|
* the interface this thread is sending data to |