public void setPublishFrame(MessagePublishInfo info, final Exchange e) throws AMQSecurityException
{
if (!getVirtualHost().getSecurityManager().authorisePublish(info.isImmediate(), info.getRoutingKey().asString(), e.getName()))
{
throw new AMQSecurityException("Permission denied: " + e.getName());
}
_currentMessage = new IncomingMessage(info);
_currentMessage.setExchange(e);
}