/**
* @param command
* @throws JMSException
*/
private void consumeBrokerAdminCommand(BrokerAdminCommand command) throws JMSException {
BrokerAdmin brokerAdmin = brokerConnector.getBrokerContainer().getBroker().getBrokerAdmin();
if (BrokerAdminCommand.CREATE_DESTINATION.equals(command.getCommand())) {
brokerAdmin.createMessageContainer(command.getDestination());
}
else if (BrokerAdminCommand.DESTROY_DESTINATION.equals(command.getCommand())) {
brokerAdmin.destoryMessageContainer(command.getDestination());
}
else if (BrokerAdminCommand.EMPTY_DESTINATION.equals(command.getCommand())) {
brokerAdmin.getMessageContainerAdmin(command.getDestination()).empty();
}
else {
throw new JMSException("Broker Admin Command type: " + command.getCommand() + " not recognized.");
}
}