}
break;
}
case SESS_FORCE_CONSUMER_DELIVERY:
{
SessionForceConsumerDelivery message = (SessionForceConsumerDelivery)packet;
session.forceConsumerDelivery(message.getConsumerID(), message.getSequence());
break;
}
case PacketImpl.SESS_PRODUCER_REQUEST_CREDITS:
{
SessionRequestProducerCreditsMessage message = (SessionRequestProducerCreditsMessage)packet;
session.requestProducerCredits(message.getAddress(), message.getCredits());
break;
}
case PacketImpl.SESS_ADD_METADATA:
{
response = new NullResponseMessage();
SessionAddMetaDataMessage message = (SessionAddMetaDataMessage)packet;
session.addMetaData(message.getKey(), message.getData());
break;
}
case PacketImpl.SESS_ADD_METADATA2:
{
SessionAddMetaDataMessageV2 message = (SessionAddMetaDataMessageV2)packet;
if (message.isRequiresConfirmations())
{
response = new NullResponseMessage();
}
session.addMetaData(message.getKey(), message.getData());
break;
}
case PacketImpl.SESS_UNIQUE_ADD_METADATA:
{
SessionUniqueAddMetaDataMessage message = (SessionUniqueAddMetaDataMessage)packet;
if (session.addUniqueMetaData(message.getKey(), message.getData()))
{
response = new NullResponseMessage();
}
else
{
response = new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.duplicateMetadata(message.getKey(), message.getData()));
}
break;
}
}
}