35 |
|
* |
36 |
|
* @param packetSorter A reference to the PacketSorter in the component |
37 |
|
* @param client A reference to the "servant" part of the connecting client. |
38 |
+ |
* @param queueMonitorInterval The interval at which to monitor our Queue. |
39 |
|
*/ |
40 |
< |
public CorbaControlHandlerServant(PacketSorter packetSorter, Client client) { |
40 |
> |
public CorbaControlHandlerServant(PacketSorter packetSorter, Client client, int queueMonitorInterval) { |
41 |
|
_packetSorter = packetSorter; |
42 |
+ |
_queueMonitorInterval = queueMonitorInterval; |
43 |
|
_hostList = ""; |
44 |
|
_client = client; |
45 |
|
_dataHandler = null; |
60 |
|
// register the Queue |
61 |
|
_packetSorter.register(dh.getQueue(), _hostList); |
62 |
|
// startup a monitor on the DataHandler's queue, every minute |
63 |
< |
dh.getQueue().startMonitor(60*1000, _packetSorter.getQueue(), _name); |
63 |
> |
String queueName = _name + " CorbaHandler"; |
64 |
> |
dh.getQueue().startMonitor(_queueMonitorInterval*1000, _packetSorter.getQueue(), queueName); |
65 |
|
// start the DataHandler running |
66 |
|
dh.start(); |
67 |
|
// keep a reference |
168 |
|
* A reference to our DataHandler, if we have one |
169 |
|
*/ |
170 |
|
private CorbaDataHandler _dataHandler; |
171 |
+ |
|
172 |
+ |
/** |
173 |
+ |
* The interval at which to monitor our Queue |
174 |
+ |
*/ |
175 |
+ |
private int _queueMonitorInterval; |
176 |
|
|
177 |
|
//---STATIC ATTRIBUTES--- |
178 |
|
|