}
//Add create the table of data
for (QueueEntry entry : messages)
{
AMQMessage msg = entry.getMessage();
if (!includeMsg(msg, msgids))
{
continue;
}
id.add(msg.getMessageId().toString());
size.add("" + msg.getSize());
arrival.add("" + msg.getArrivalTime());
try
{
ispersitent.add(msg.isPersistent() ? "true" : "false");
}
catch (AMQException e)
{
ispersitent.add("n/a");
}
isredelivered.add(msg.isRedelivered() ? "true" : "false");
isdelivered.add(msg.getDeliveredToConsumer() ? "true" : "false");
// msg.getMessageHandle();
BasicContentHeaderProperties headers = null;
try
{
headers = ((BasicContentHeaderProperties) msg.getContentHeaderBody().properties);
}
catch (AMQException e)
{
//ignore
// commandError("Unable to read properties for message: " + e.getMessage(), null);
}
if (headers != null)
{
String appidS = headers.getAppIdAsString();
appid.add(appidS == null ? "null" : appidS);
String clusterS = headers.getClusterIdAsString();
clusterid.add(clusterS == null ? "null" : clusterS);
String contentS = headers.getContentTypeAsString();
contenttype.add(contentS == null ? "null" : contentS);
String correlationS = headers.getCorrelationIdAsString();
correlationid.add(correlationS == null ? "null" : correlationS);
deliverymode.add("" + headers.getDeliveryMode());
AMQShortString encodeSS = headers.getEncoding();
encoding.add(encodeSS == null ? "null" : encodeSS.toString());
expiration.add("" + headers.getExpiration());
FieldTable headerFT = headers.getHeaders();
msgHeaders.add(headerFT == null ? "none" : "" + headerFT.toString());
priority.add("" + headers.getPriority());
propertyflag.add("" + headers.getPropertyFlags());
AMQShortString replytoSS = headers.getReplyTo();
replyto.add(replytoSS == null ? "null" : replytoSS.toString());
timestamp.add("" + headers.getTimestamp());
AMQShortString typeSS = headers.getType();
type.add(typeSS == null ? "null" : typeSS.toString());
AMQShortString useridSS = headers.getUserId();
userid.add(useridSS == null ? "null" : useridSS.toString());
MessagePublishInfo info = null;
try
{
info = msg.getMessagePublishInfo();
}
catch (AMQException e)
{
//ignore
}