MessageProperties messageProps = null;
if(serverMsg instanceof MessageTransferMessage)
{
MessageTransferMessage msg = (MessageTransferMessage) serverMsg;
DeliveryProperties origDeliveryProps = msg.getHeader() == null ? null : msg.getHeader().getDeliveryProperties();
messageProps = msg.getHeader() == null ? null : msg.getHeader().getMessageProperties();
deliveryProps = new DeliveryProperties();
if(origDeliveryProps != null)
{
if(origDeliveryProps.hasDeliveryMode())
{
deliveryProps.setDeliveryMode(origDeliveryProps.getDeliveryMode());
}
if(origDeliveryProps.hasExchange())
{
deliveryProps.setExchange(origDeliveryProps.getExchange());
}
if(origDeliveryProps.hasExpiration())
{
deliveryProps.setExpiration(origDeliveryProps.getExpiration());
}
if(origDeliveryProps.hasPriority())
{
deliveryProps.setPriority(origDeliveryProps.getPriority());
}
if(origDeliveryProps.hasRoutingKey())
{
deliveryProps.setRoutingKey(origDeliveryProps.getRoutingKey());
}
if(origDeliveryProps.hasTimestamp())
{
deliveryProps.setTimestamp(origDeliveryProps.getTimestamp());
}
if(origDeliveryProps.hasTtl())
{
deliveryProps.setTtl(origDeliveryProps.getTtl());
}
}
deliveryProps.setRedelivered(entry.isRedelivered());
if(_trace != null && messageProps == null)
{
messageProps = new MessageProperties();
}
Header header = new Header(deliveryProps, messageProps, msg.getHeader() == null ? null : msg.getHeader().getNonStandardProperties());
xfr = batch ? new MessageTransfer(_destination,_acceptMode,_acquireMode,header,msg.getBody(), BATCHED)
: new MessageTransfer(_destination,_acceptMode,_acquireMode,header,msg.getBody());
}
else if(serverMsg instanceof AMQMessage)
{
AMQMessage message_0_8 = (AMQMessage) serverMsg;
deliveryProps = new DeliveryProperties();