printusage();
return;
}
MBeanServerConnection mbsc = info.getmbserverconnector();
Set set = null;
ObjectNames objname = null;
try
{
if (option_value.compareToIgnoreCase("queue") == 0 || option_value.compareToIgnoreCase("queues") == 0)
{
objname = new QueueObject(mbsc);
}
else if (option_value.compareToIgnoreCase("Virtualhosts") == 0
|| option_value.compareToIgnoreCase("Virtualhost") == 0)
{
objname = new VirtualHostObject(mbsc);
// this.name = option_value;
}
else if (option_value.compareToIgnoreCase("Exchange") == 0
|| option_value.compareToIgnoreCase("Exchanges") == 0)
{
objname = new ExchangeObject(mbsc);
// this.name = option_value;
}
else if (option_value.compareToIgnoreCase("Connection") == 0
|| option_value.compareToIgnoreCase("Connections") == 0)
{
objname = new ConnectionObject(mbsc);
// this.name = option_value;
}
else if (option_value.compareToIgnoreCase("all") == 0)
{
objname = new AllObjects(mbsc);
// this.name = option_value;
}
else if (option_value.compareToIgnoreCase("Usermanagement") == 0
|| option_value.compareToIgnoreCase("Usermanagmenets") == 0)
{
objname = new UserManagementObject(mbsc);
// this.name = option_value;
}
else
{
printusage();
echo("Wrong objectName");
return;
}
objname.setQueryString(this.getObject(), this.getName(), this.getVirtualhost());
objname.returnObjects();
if (objname.getSet().size() != 0)
{
if (this.getObject().compareToIgnoreCase("queue") == 0
|| this.getObject().compareToIgnoreCase("queues") == 0)
objname.displayqueues(this.getOutputFormat(), this.getSeperator());
else
objname.displayobjects(this.getOutputFormat(), this.getSeperator());
}
else
{
if (hasName())
{