private String[] getMessageTransferMessageHeaderProps(MessageTransferMessage msg)
{
List<String> list = new ArrayList<String>();
AMQMessageHeader header = msg.getMessageHeader();
MessageProperties msgProps = msg.getHeader().get(MessageProperties.class);
String appID = null;
String userID = null;
if(msgProps != null)
{
appID = msgProps.getAppId() == null ? "null" : new String(msgProps.getAppId());
userID = msgProps.getUserId() == null ? "null" : new String(msgProps.getUserId());
}
list.add("reply-to = " + header.getReplyTo());
list.add("propertyFlags = "); //TODO
list.add("ApplicationID = " + appID);
list.add("ClusterID = "); //TODO
list.add("UserId = " + userID);
list.add("JMSMessageID = " + header.getMessageId());
list.add("JMSCorrelationID = " + header.getCorrelationId());
list.add("JMSDeliveryMode = " + (msg.isPersistent() ? "Persistent" : "Non_Persistent"));
list.add("JMSPriority = " + header.getPriority());
list.add("JMSType = " + header.getType());
long longDate = header.getExpiration();
String strDate = (longDate != 0) ? _dateFormat.format(new Date(longDate)) : null;
list.add("JMSExpiration = " + strDate);
longDate = header.getTimestamp();
strDate = (longDate != 0) ? _dateFormat.format(new Date(longDate)) : null;
list.add("JMSTimestamp = " + strDate);
return list.toArray(new String[list.size()]);
}