}
}
public void contentBodyReceived(final int channelId, ContentBody contentBody) throws AMQException
{
UnprocessedMessage_0_8 msg;
final boolean fastAccess = (channelId & FAST_CHANNEL_ACCESS_MASK) == 0;
if (fastAccess)
{
msg = (UnprocessedMessage_0_8) _channelId2UnprocessedMsgArray[channelId];
}
else
{
msg = (UnprocessedMessage_0_8) _channelId2UnprocessedMsgMap.get(channelId);
}
if (msg == null)
{
throw new AMQException(null, "Error: received content body without having received a JMSDeliver frame first", null);
}
if (msg.getContentHeader() == null)
{
if (fastAccess)
{
_channelId2UnprocessedMsgArray[channelId] = null;
}
else
{
_channelId2UnprocessedMsgMap.remove(channelId);
}
throw new AMQException(null, "Error: received content body without having received a ContentHeader frame first", null);
}
msg.receiveBody(contentBody);
if (msg.isAllBodyDataReceived())
{
deliverMessageToAMQSession(channelId, msg);
}
}