public void decode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
{
AMQMethodBodyFactory bodyFactory = (AMQMethodBodyFactory) session.getAttribute(SESSION_METHOD_BODY_FACTORY);
if (bodyFactory == null)
{
AMQVersionAwareProtocolSession protocolSession = (AMQVersionAwareProtocolSession) session.getAttachment();
bodyFactory = new AMQMethodBodyFactory(protocolSession);
session.setAttribute(SESSION_METHOD_BODY_FACTORY, bodyFactory);
}
out.write(createAndPopulateFrame(bodyFactory, in));