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 |
|
|
35 |
|
* @param queue a reference to a queue to use |
36 |
|
*/ |
37 |
|
public CIWrapper(ClientInterface destination, Queue queue){ |
38 |
+ |
// set the Thread name |
39 |
+ |
setName("rootfilter.CIWrapper"); |
40 |
+ |
|
41 |
|
_destination = destination; |
42 |
|
_queue = queue; |
43 |
+ |
_queueID = queue.getQueue(); |
44 |
|
} |
45 |
|
|
46 |
|
//---PUBLIC METHODS--- |
49 |
|
* start the thread and thus gets and sends data |
50 |
|
*/ |
51 |
|
public void run() { |
47 |
– |
int n = _queue.getQueue(); |
52 |
|
String xml = null; |
53 |
|
while(true) { |
54 |
|
try { |
55 |
< |
xml = (String) _queue.get(n); |
55 |
> |
xml = (String) _queue.get(_queueID); |
56 |
|
} |
57 |
|
catch (InvalidQueueException e) { |
58 |
|
_logger.write(toString(), Logger.ERROR, "Queue error: "+e); |
81 |
|
* A reference to a Queue object. |
82 |
|
*/ |
83 |
|
private Queue _queue; |
84 |
+ |
|
85 |
+ |
/** |
86 |
+ |
* Our Queue id. |
87 |
+ |
*/ |
88 |
+ |
private int _queueID; |
89 |
|
|
90 |
|
/** |
91 |
|
* the interface this thread is sending data to |