use of org.jaffa.qm.apis.data.MessageAdminResponse in project jaffa-framework by jaffa-projects.
the class QueueManager method deleteMessage.
public MessageAdminResponse[] deleteMessage(MessageGraph[] graphs) {
// TODO-SWAT fire custom handler here
try {
if (log.isDebugEnabled())
log.debug("Input to deleteMessage: " + graphs);
MessageAdminResponse[] aggregateResponse = null;
IQueueAdmin[] implementations = findImplementations();
if (implementations != null && implementations.length > 0) {
for (IQueueAdmin implementation : implementations) {
MessageAdminResponse[] response = implementation.deleteMessage(graphs);
if (response != null && response.length > 0)
aggregateResponse = concatenate(aggregateResponse, response);
}
}
if (log.isDebugEnabled())
log.debug("Response from deleteMessage: " + aggregateResponse);
return aggregateResponse;
} catch (Exception e) {
log.error("Error in obtaining IQueueAdmin implementations", e);
return new MessageAdminResponse[] { new MessageAdminResponse(null, ServiceError.generate(e)) };
}
}
Aggregations