Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2005-2014 Red Hat, Inc.
* Red Hat licenses this file to you under the Apache License, version
* 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package org.hornetq.api.jms.management;
import java.util.Map;
import javax.management.MBeanOperationInfo;
import org.hornetq.api.core.management.Operation;
import org.hornetq.api.core.management.Parameter;
/**
* A JMSQueueControl is used to manage a JMS queue.
*
* @author Jeff Mesnil
*/
public interface JMSQueueControl extends DestinationControl
{
// Attributes ----------------------------------------------------
/**
* Returns the expiry address associated to this queue.
*/
String getExpiryAddress();
/**
* Sets the expiry address associated to this queue to the specified expiryAddress.
* @deprecated: it's non persisted. Use the proper address settings
*/
@Deprecated
void setExpiryAddress(@Parameter(name = "expiryAddress", desc = "Expiry address of the queue") String expiryAddress) throws Exception;
/**
* Returns the dead-letter address associated to this queue.
*/
String getDeadLetterAddress();
/**
* Sets the dead-letter address associated to this queue to the specified deadLetterAddress.
* @deprecated: it's non persisted. Use the proper address settings
*/
@Deprecated
void setDeadLetterAddress(@Parameter(name = "deadLetterAddress", desc = "Dead-letter address of the queue") String deadLetterAddress) throws Exception;
/**
* Returns the number of scheduled messages in this queue.
*/
long getScheduledCount();
/**
* Returns the number of consumers consuming messages from this queue.
*/
int getConsumerCount();
/**
* returns the selector for the queue
*/
String getSelector();
// Operations ----------------------------------------------------
/**
* Returns the JNDI bindings associated to this connection factory.
*/
@Operation(desc = "Returns the list of JNDI bindings associated")
String[] getJNDIBindings();
/**
* Add the JNDI binding to this destination
*/
@Operation(desc = "Adds the queue to another JNDI binding")
void addJNDI(@Parameter(name = "jndiBinding", desc = "the name of the binding for JNDI") String jndi) throws Exception;
/**
* Lists all the JMS messages in this queue matching the specified filter.
*
* 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
*
* Using {@code null} or an empty filter will list all messages from this queue.
*/
@Operation(desc = "List all messages in the queue which matches the filter", impact = MBeanOperationInfo.INFO)
Map[] listMessages(@Parameter(name = "filter", desc = "A JMS Message filter") String filter) throws Exception;
/**
* Lists all the JMS messages in this queue matching the specified filter using JSON serialization.
*
* Using {@code null} or an empty filter will list all messages from this queue.
*/
@Operation(desc = "List all messages in the queue which matches the filter and return them using JSON", impact = MBeanOperationInfo.INFO)
String listMessagesAsJSON(@Parameter(name = "filter", desc = "A JMS Message filter (can be empty)") String filter) throws Exception;
/**
* Counts the number of messages in this queue matching the specified filter.
*
* Using {@code null} or an empty filter will count all messages from this queue.
*/
@Operation(desc = "Returns the number of the messages in the queue matching the given filter", impact = MBeanOperationInfo.INFO)
long countMessages(@Parameter(name = "filter", desc = "A JMS message filter (can be empty)") String filter) throws Exception;
/**
* Removes the message corresponding to the specified message ID.
*
* @return {@code true} if the message was removed, {@code false} else
*/
@Operation(desc = "Remove the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
boolean removeMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID) throws Exception;
/**
* Removes all the message corresponding to the specified filter.
*
* Using {@code null} or an empty filter will remove all messages from this queue.
*
* @return the number of removed messages
*/
@Operation(desc = "Remove the messages corresponding to the given filter (and returns the number of removed messages)", impact = MBeanOperationInfo.ACTION)
int removeMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
/**
* Expires all the message corresponding to the specified filter.
*
* Using {@code null} or an empty filter will expire all messages from this queue.
*
* @return the number of expired messages
*/
@Operation(desc = "Expire the messages corresponding to the given filter (and returns the number of expired messages)", impact = MBeanOperationInfo.ACTION)
int expireMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
/**
* Expires the message corresponding to the specified message ID.
*
* @return {@code true} if the message was expired, {@code false} else
*/
@Operation(desc = "Expire the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
boolean expireMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID) throws Exception;
/**
* Sends the message corresponding to the specified message ID to this queue's dead letter address.
*
* @return {@code true} if the message was sent to the dead letter address, {@code false} else
*/
@Operation(desc = "Send the message corresponding to the given messageID to this queue's Dead Letter Address", impact = MBeanOperationInfo.ACTION)
boolean sendMessageToDeadLetterAddress(@Parameter(name = "messageID", desc = "A message ID") String messageID) throws Exception;
/**
* Sends all the message corresponding to the specified filter to this queue's dead letter address.
*
* Using {@code null} or an empty filter will send all messages from this queue.
*
* @return the number of sent messages
*/
@Operation(desc = "Send the messages corresponding to the given filter to this queue's Dead Letter Address", impact = MBeanOperationInfo.ACTION)
int sendMessagesToDeadLetterAddress(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filterStr) throws Exception;
/**
* Changes the message's priority corresponding to the specified message ID to the specified priority.
*
* @param newPriority between 0 and 9 inclusive.
*
* @return {@code true} if the message priority was changed
*/
@Operation(desc = "Change the priority of the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
boolean changeMessagePriority(@Parameter(name = "messageID", desc = "A message ID") String messageID,
@Parameter(name = "newPriority", desc = "the new priority (between 0 and 9)") int newPriority) throws Exception;
/**
* Changes the priority for all the message corresponding to the specified filter to the specified priority.
*
* Using {@code null} or an empty filter will change all messages from this queue.
*
* @return the number of changed messages
*/
@Operation(desc = "Change the priority of the messages corresponding to the given filter", impact = MBeanOperationInfo.ACTION)
int changeMessagesPriority(@Parameter(name = "filter", desc = "A message filter") String filter,
@Parameter(name = "newPriority", desc = "the new priority (between 0 and 9)") int newPriority) throws Exception;
/**
* Moves the message corresponding to the specified message ID to the specified other queue.
*
* @return {@code true} if the message was moved, {@code false} else
*/
@Operation(desc = "Move the message corresponding to the given messageID to another queue, ignoring duplicates (rejectDuplicates=false on this case)", impact = MBeanOperationInfo.ACTION)
boolean moveMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID,
@Parameter(name = "otherQueueName", desc = "The name of the queue to move the message to") String otherQueueName) throws Exception;
/**
* Moves the message corresponding to the specified message ID to the specified other queue.
*
* @return {@code true} if the message was moved, {@code false} else
*/
@Operation(desc = "Move the message corresponding to the given messageID to another queue", impact = MBeanOperationInfo.ACTION)
boolean moveMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID,
@Parameter(name = "otherQueueName", desc = "The name of the queue to move the message to") String otherQueueName,
@Parameter(name = "rejectDuplicates", desc = "Reject messages identified as duplicate by the duplicate message") boolean rejectDuplicates) throws Exception;
/**
* Moves all the message corresponding to the specified filter to the specified other queue.
* RejectDuplicates=false on this case
*
* Using {@code null} or an empty filter will move all messages from this queue.
*
* @return the number of moved messages
*/
@Operation(desc = "Move the messages corresponding to the given filter (and returns the number of moved messages). rejectDuplicates=false on this case", impact = MBeanOperationInfo.ACTION)
int moveMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter,
@Parameter(name = "otherQueueName", desc = "The name of the queue to move the messages to") String otherQueueName) throws Exception;
/**
* Moves all the message corresponding to the specified filter to the specified other queue.
*
* Using {@code null} or an empty filter will move all messages from this queue.
*
* @return the number of moved messages
*/
@Operation(desc = "Move the messages corresponding to the given filter (and returns the number of moved messages)", impact = MBeanOperationInfo.ACTION)
int moveMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter,
@Parameter(name = "otherQueueName", desc = "The name of the queue to move the messages to") String otherQueueName,
@Parameter(name = "rejectDuplicates", desc = "Reject messages identified as duplicate by the duplicate message") boolean rejectDuplicates) throws Exception;
/**
* Lists the message counter for this queue.
*/
@Operation(desc = "List the message counters", impact = MBeanOperationInfo.INFO)
String listMessageCounter() throws Exception;
/**
* Resets the message counter for this queue.
*/
@Operation(desc = "Reset the message counters", impact = MBeanOperationInfo.INFO)
void resetMessageCounter() throws Exception;
/**
* Lists the message counter for this queue as a HTML table.
*/
@Operation(desc = "List the message counters as HTML", impact = MBeanOperationInfo.INFO)
String listMessageCounterAsHTML() throws Exception;
/**
* Lists the message counter history for this queue.
*/
@Operation(desc = "List the message counters history", impact = MBeanOperationInfo.INFO)
String listMessageCounterHistory() throws Exception;
/**
* Lists the message counter history for this queue as a HTML table.
*/
@Operation(desc = "List the message counters history as HTML", impact = MBeanOperationInfo.INFO)
String listMessageCounterHistoryAsHTML() throws Exception;
/**
* Pauses the queue. Messages are no longer delivered to its consumers.
*/
@Operation(desc = "Pause the queue.", impact = MBeanOperationInfo.ACTION)
void pause() throws Exception;
/**
* Returns whether the queue is paused.
*/
@Operation(desc = "Returns true if the queue is paused.", impact = MBeanOperationInfo.INFO)
boolean isPaused() throws Exception;
/**
* Resumes the queue. Messages are again delivered to its consumers.
*/
@Operation(desc = "Resume the queue.", impact = MBeanOperationInfo.ACTION)
void resume() throws Exception;
@Operation(desc = "List all the existent consumers on the Queue")
String listConsumersAsJSON() throws Exception;
/**
* Lists all the messages scheduled for delivery for this queue.
*
* 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
*/
@Operation(desc = "List the messages scheduled for delivery", impact = MBeanOperationInfo.INFO)
Map[] listScheduledMessages() throws Exception;
/**
* Lists all the messages scheduled for delivery for this queue using JSON serialization.
*/
@Operation(desc = "List the messages scheduled for delivery and returns them using JSON", impact = MBeanOperationInfo.INFO)
String listScheduledMessagesAsJSON() throws Exception;
/**
* Lists all the messages being deliver per consumer.
*
* The Map's key is a toString representation for the consumer. Each consumer will then return a Map[] same way is returned by {@link #listScheduledMessages()}
*/
@Operation(desc = "List all messages being delivered per consumer")
Map[]> listDeliveringMessages() throws Exception;
/**
* Executes a conversion of {@link #listDeliveringMessages()} to JSON
*
* @return
* @throws Exception
*/
@Operation(desc = "list all messages being delivered per consumer using JSON form")
String listDeliveringMessagesAsJSON() throws Exception;
}