* @param address the connection address information for the subscription.
* @param timestamp the timestamp of the subscription.
*/
private void validateQueue(final String queueName, final String address, final String timestamp)
{
ObjectId queueId = null;
List<QmfConsoleData> queues = _console.getObjects("org.apache.qpid.broker", "queue");
for (QmfConsoleData queue : queues)
{ // We first have to find the ObjectId of the queue called queueName.
if (queue.getStringValue("name").equals(queueName))
{
queueId = queue.getObjectId();
break;
}
}
if (queueId == null)
{
System.out.printf("%s ERROR ConnectionAudit.validateQueue() %s reference couldn't be found\n",
new Date().toString(), queueName);
}
else
{ // If we've got the queue's ObjectId we then find the binding that references it.
List<QmfConsoleData> bindings = _console.getObjects("org.apache.qpid.broker", "binding");
for (QmfConsoleData binding : bindings)
{
ObjectId queueRef = binding.getRefValue("queueRef");
if (queueRef.equals(queueId))
{ // We've found a binding that matches queue queueName so look up the associated exchange and validate.
QmfConsoleData exchange = dereference(binding.getRefValue("exchangeRef"));
String exchangeName = exchange.getStringValue("name");
validateQueue(queueName, exchangeName, binding, address, timestamp);
}