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 |
+ |
* @param clientname A name to identify the client. |
40 |
|
*/ |
41 |
< |
public CorbaControlHandlerServant(PacketSorter packetSorter, Client client) { |
41 |
> |
public CorbaControlHandlerServant(PacketSorter packetSorter, Client client, int queueMonitorInterval, String clientname) { |
42 |
|
_packetSorter = packetSorter; |
43 |
+ |
_queueMonitorInterval = queueMonitorInterval; |
44 |
|
_hostList = ""; |
45 |
|
_client = client; |
46 |
+ |
_clientname = clientname; |
47 |
|
_dataHandler = null; |
48 |
|
_logger.write(toString(), Logger.SYSINIT, "created"); |
49 |
|
} |
61 |
|
CorbaDataHandler dh = new CorbaDataHandler(_client); |
62 |
|
// register the Queue |
63 |
|
_packetSorter.register(dh.getQueue(), _hostList); |
64 |
+ |
// startup a monitor on the DataHandler's queue, every minute |
65 |
+ |
String queueName = _name + " CorbaHandler:"+_clientname; |
66 |
+ |
dh.getQueue().startMonitor(_queueMonitorInterval*1000, _packetSorter.getQueue(), queueName); |
67 |
|
// start the DataHandler running |
68 |
|
dh.start(); |
69 |
|
// keep a reference |
170 |
|
* A reference to our DataHandler, if we have one |
171 |
|
*/ |
172 |
|
private CorbaDataHandler _dataHandler; |
173 |
+ |
|
174 |
+ |
/** |
175 |
+ |
* The interval at which to monitor our Queue |
176 |
+ |
*/ |
177 |
+ |
private int _queueMonitorInterval; |
178 |
+ |
|
179 |
+ |
/** |
180 |
+ |
* A name to identify the client |
181 |
+ |
*/ |
182 |
+ |
private String _clientname; |
183 |
|
|
184 |
|
//---STATIC ATTRIBUTES--- |
185 |
|
|