33 |
|
|
34 |
|
/** |
35 |
|
* Creates a new PacketSorter. |
36 |
– |
* |
37 |
– |
* @param queueMonitorInterval The interval at which to monitor the Queue |
36 |
|
*/ |
37 |
< |
public PacketSorter(int queueMonitorInterval) { |
37 |
> |
public PacketSorter() { |
38 |
|
// set the Thread name |
39 |
|
setName("clientinterface.PacketSorter"); |
40 |
|
|
41 |
|
_queue = new Queue(); |
42 |
< |
// startup a monitor on this queue, every minute |
43 |
< |
String queueName = _name + " PacketSorterQueue"; |
44 |
< |
_queue.startMonitor(queueMonitorInterval*1000, queueName); |
42 |
> |
// startup a monitor on this queue |
43 |
> |
try { |
44 |
> |
// try to get the interval, if this fails, we won't start up the monitor |
45 |
> |
ConfigurationProxy cp = ConfigurationProxy.getInstance(); |
46 |
> |
int queueMonitorInterval = Integer.parseInt(cp.getProperty("ClientInterface", "Queue.MonitorInterval")); |
47 |
> |
String queueName = _name + " PacketSorterQueue"; |
48 |
> |
_queue.startMonitor(queueMonitorInterval*1000, queueName); |
49 |
> |
} catch (PropertyNotFoundException e) { |
50 |
> |
_logger.write(toString(), Logger.WARNING, "failed to find queue monitor config, disabling. " + e); |
51 |
> |
} |
52 |
> |
|
53 |
|
_hostMap = new HashMap(); |
54 |
|
_allHostDataList = new LinkedList(); |
55 |
|
_allHostsList = new LinkedList(); |