protected AttributeDefinition[] getReplyMessageParameterDefinitions() {
return JMSManagementHelper.JMS_MESSAGE_PARAMETERS;
}
protected AbstractQueueControlHandler.DelegatingQueueControl<JMSQueueControl> getQueueControl(HornetQServer hqServer, String queueName){
final JMSQueueControl control = JMSQueueControl.class.cast(hqServer.getManagementService().getResource(ResourceNames.JMS_QUEUE + queueName));
if (control == null) {
return null;
}
return new AbstractQueueControlHandler.DelegatingQueueControl<JMSQueueControl>() {
@Override
public JMSQueueControl getDelegate() {
return control;
}
@Override
public String listMessagesAsJSON(String filter) throws Exception {
return control.listMessagesAsJSON(filter);
}
@Override
public long countMessages(String filter) throws Exception {
return control.countMessages(filter);
}
@Override
public boolean removeMessage(ModelNode id) throws Exception {
return control.removeMessage(id.asString());
}
@Override
public int removeMessages(String filter) throws Exception {
return control.removeMessages(filter);
}
@Override
public int expireMessages(String filter) throws Exception {
return control.expireMessages(filter);
}
@Override
public boolean expireMessage(ModelNode id) throws Exception {
return control.expireMessage(id.asString());
}
@Override
public boolean sendMessageToDeadLetterAddress(ModelNode id) throws Exception {
return control.sendMessageToDeadLetterAddress(id.asString());
}
@Override
public int sendMessagesToDeadLetterAddress(String filter) throws Exception {
return control.sendMessagesToDeadLetterAddress(filter);
}
@Override
public boolean changeMessagePriority(ModelNode id, int priority) throws Exception {
return control.changeMessagePriority(id.asString(), priority);
}
@Override
public int changeMessagesPriority(String filter, int priority) throws Exception {
return control.changeMessagesPriority(filter, priority);
}
@Override
public boolean moveMessage(ModelNode id, String otherQueue) throws Exception {
return control.moveMessage(id.asString(), otherQueue);
}
@Override
public boolean moveMessage(ModelNode id, String otherQueue, boolean rejectDuplicates) throws Exception {
return control.moveMessage(id.asString(), otherQueue, rejectDuplicates);
}
@Override
public int moveMessages(String filter, String otherQueue) throws Exception {
return control.moveMessages(filter, otherQueue);
}
@Override
public int moveMessages(String filter, String otherQueue, boolean rejectDuplicates) throws Exception {
return control.moveMessages(filter, otherQueue, rejectDuplicates);
}
@Override
public String listMessageCounter() throws Exception {
return control.listMessageCounter();
}
@Override
public void resetMessageCounter() throws Exception {
control.resetMessageCounter();
}
@Override
public String listMessageCounterAsHTML() throws Exception {
return control.listMessageCounterAsHTML();
}
@Override
public String listMessageCounterHistory() throws Exception {
return control.listMessageCounterHistory();
}
@Override
public String listMessageCounterHistoryAsHTML() throws Exception {
return control.listMessageCounterHistoryAsHTML();
}
@Override
public void pause() throws Exception {
control.pause();
}
@Override
public void resume() throws Exception {
control.resume();
}
@Override
public String listConsumersAsJSON() throws Exception {
return control.listConsumersAsJSON();
}
};
}