[jboss-cvs] JBossAS SVN: r101028 - in branches/Branch_Hornet_Temporary_2/hornetq-int/src: resources/META-INF and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 16 11:58:00 EST 2010
Author: ataylor
Date: 2010-02-16 11:57:59 -0500 (Tue, 16 Feb 2010)
New Revision: 101028
Modified:
branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java
branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml
Log:
added core queue operations and fixed string[] results
Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java 2010-02-16 16:50:41 UTC (rev 101027)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java 2010-02-16 16:57:59 UTC (rev 101028)
@@ -59,6 +59,10 @@
{
return formatSubscriptionInfoResults(result);
}
+ else if ("Message".equalsIgnoreCase(oper.getResultsType()))
+ {
+ return formatMessageResults(result);
+ }
else
{
return formatStringResults(result.toString());
@@ -178,6 +182,25 @@
return operationResult;
}
+ OperationResult formatMessageResults(final Object result)
+ {
+ OperationResult operationResult = new OperationResult();
+ Configuration c = operationResult.getComplexResults();
+ PropertyList property = new PropertyList("result");
+ Map[] map = (Map[]) result;
+ for (Map map1 : map)
+ {
+ org.rhq.core.domain.configuration.PropertyMap p1 = new org.rhq.core.domain.configuration.PropertyMap("element");
+ property.add(p1);
+ for (Object o1 : map1.keySet())
+ {
+ p1.put(new PropertySimple((String) o1, map1.get(o1)));
+ }
+ }
+ c.put(property);
+ return operationResult;
+ }
+
OperationResult formatSubscriptionInfoResults(final Object result)
{
OperationResult operationResult = new OperationResult();
@@ -212,10 +235,11 @@
Configuration c = operationResult.getComplexResults();
PropertyList property = new PropertyList("result");
String[] Strings = (String[]) result;
- property.add(new PropertySimple("element", "test"));
for (String string : Strings)
{
- property.add(new PropertySimple("element", string));
+ org.rhq.core.domain.configuration.PropertyMap p1 = new org.rhq.core.domain.configuration.PropertyMap("element");
+ p1.put(new PropertySimple("value", string));
+ property.add(p1);
}
c.put(property);
return operationResult;
Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml 2010-02-16 16:50:41 UTC (rev 101027)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml 2010-02-16 16:57:59 UTC (rev 101028)
@@ -133,8 +133,10 @@
</operation>
<operation name="listRemoteAddresses,result=String[]" displayName="List Remote Addresses" description="List all remote addresses connected to HornetQ.">
<results>
- <c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:list-property name="result">
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -144,7 +146,9 @@
</parameters>
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -157,7 +161,9 @@
<operation name="listConnectionIDs,result=String[]" displayName="List connections" description="List all the connection IDs.">
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -167,7 +173,9 @@
</parameters>
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -528,21 +536,27 @@
<operation name="listPreparedTransactions,result=string[]" displayName="List all prepared transactions" description="List all the prepared transaction, sorted by date, oldest first.">
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
<operation name="listHeuristicCommittedTransactions,result=string[]" displayName="List heuristically committed transactions" description="List transactions which have been heuristically committed.">
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
<operation name="listHeuristicRolledBackTransactions,result=string[]" displayName="List heuristically rolled back transactions" description="List transactions which have been heuristically rolled back.">
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -559,17 +573,22 @@
<operation name="listRemoteAddresses,result=string[]" displayName="Lists the addresses" description="Lists the addresses of all the clients connected to this address.">
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
<operation name="listRemoteAddresses2,operation=listRemoteAddresses,result=string[]" displayName="Lists the addresses with ip address" description="Lists the addresses a specified ip address connected to this address.">
<parameters>
<c:simple-property required="true" name="ipAddress" displayName="ip address"/>
- </parameters><results>
+ </parameters>
+ <results>
<c:list-property name="result">
- <c:simple-property name="element"/>
- </c:list-property>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
+ </c:list-property>>
</results>
</operation>
<operation name="closeConnectionsForAddress" displayName="Closes Connections" description="Closes all the connections for the given IP Address.">
@@ -583,7 +602,9 @@
<operation name="listConnectionIDs,result=string[]" displayName="List connection IDs" description="List all the connection IDs.">
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -593,7 +614,9 @@
</parameters>
<results>
<c:list-property name="result">
- <c:simple-property name="element"/>
+ <c:map-property required="false" name="element">
+ <c:simple-property type="string" name="value"/>
+ </c:map-property>
</c:list-property>
</results>
</operation>
@@ -1088,6 +1111,157 @@
<c:simple-property name="resourceNameProperty" default="name"/>
<c:simple-property name="searchString" default="name=*"/>
</plugin-configuration>
+ <operation name="listScheduledMessages,result=Message" displayName="List the messages scheduled for delivery" description="Lists all the messages scheduled for delivery for this queue.">
+ <results>
+ <c:list-property name="result">
+ <c:map-property required="false" name="element">
+ <c:simple-property type="long" name="messageID"/>
+ <c:simple-property type="string" required="false" name="address"/>
+ <c:simple-property type="integer" required="false" name="type"/>
+ <c:simple-property type="boolean" required="false" name="durable"/>
+ <c:simple-property type="long" name="expiration"/>
+ <c:simple-property type="long" name="timestamp"/>
+ <c:simple-property type="integer" name="priority"/>
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+ <operation name="listMessages,result=Message" displayName="List all the messages in the queue matching the given filter" description="List all the messages in the queue matching the given filter.">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="A message filter (can be empty)"/>
+ </parameters>
+ <results>
+ <c:list-property name="result">
+ <c:map-property required="false" name="element">
+ <c:simple-property type="long" name="messageID"/>
+ <c:simple-property type="string" required="false" name="address"/>
+ <c:simple-property type="integer" required="false" name="type"/>
+ <c:simple-property type="boolean" required="false" name="durable"/>
+ <c:simple-property type="long" name="expiration"/>
+ <c:simple-property type="long" name="timestamp"/>
+ <c:simple-property type="integer" name="priority"/>
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+ <operation name="countMessages" displayName="count all the messages" description="Returns the number of the messages in the queue matching the given filter.">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="the filter"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="integer" description="Number of the messages in the queue matching the given filter."/>
+ </results>
+ </operation>
+ <operation name="removeMessage" displayName="remove message" description="Remove the message corresponding to the given messageID.">
+ <parameters>
+ <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="boolean" description="Was the message removed."/>
+ </results>
+ </operation>
+ <operation name="removeMessages" displayName="Removes all the message corresponding to the specified filter" description="Remove the messages corresponding to the given filter (and returns the number of removed messages).">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="the filter"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="integer" description="Number of the messages removed."/>
+ </results>
+ </operation>
+ <operation name="expireMessages" displayName="expires all the message corresponding to the specified filter" description="Expires the messages corresponding to the given filter (and returns the number of removed messages).">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="the filter"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="integer" description="Number of the messages removed."/>
+ </results>
+ </operation>
+ <operation name="expireMessage" displayName="expire message" description="Expire the message corresponding to the given messageID.">
+ <parameters>
+ <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="boolean" description="Was the message removed."/>
+ </results>
+ </operation>
+ <operation name="moveMessage" displayName="move message" description="move the message corresponding to the given messageID.">
+ <parameters>
+ <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+ <c:simple-property required="true" name="otherQueueName" displayName="The name of the queue to move the message to"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="boolean" description="Was the message removed."/>
+ </results>
+ </operation>
+ <operation name="moveMessages" displayName="move messages" description="move the message corresponding to the given filter.">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="the filter"/>
+ <c:simple-property required="true" name="otherQueueName" displayName="The name of the queue to move the message to"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="integer" description="Number of the messages moved."/>
+ </results>
+ </operation>
+ <operation name="sendMessageToDeadLetterAddress" displayName="Send the message corresponding to the given messageID to this queue's Dead Letter Address" description="Send the message corresponding to the given messageID to this queue's Dead Letter Address.">
+ <parameters>
+ <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="boolean" description="Was the message removed."/>
+ </results>
+ </operation>
+ <operation name="sendMessagesToDeadLetterAddress" displayName="Send messages corresponding to Dead Letter Address" description="Send the messages corresponding to the given filter to this queue's Dead Letter Address.">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="the filter"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="integer" description="Number of the messages moved."/>
+ </results>
+ </operation>
+ <operation name="changeMessagePriority" displayName="Change the priority of message" description="Change the priority of the message corresponding to the given messageID.">
+ <parameters>
+ <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+ <c:simple-property required="true" name="newPriority" displayName="the new priority (between 0 and 9)"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="boolean" description="Was the message updated."/>
+ </results>
+ </operation>
+ <operation name="changeMessagesPriority" displayName="Change the priority of messages" description="Change the priority of the message corresponding to the given messageID.">
+ <parameters>
+ <c:simple-property required="false" name="filter" displayName="the filter"/>
+ <c:simple-property required="true" name="newPriority" displayName="the new priority (between 0 and 9)"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult" type="integer" description="Number of the messages updated."/>
+ </results>
+ </operation>
+ <operation name="listMessageCounter" displayName="list message counter" description="List the message counters.">
+ <results>
+ <c:simple-property name="operationResult" description="Message Counters."/>
+ </results>
+ </operation>
+ <operation name="resetMessageCounter" displayName="reset message counters" description="Reset the message counters.">
+ </operation>
+ <operation name="listMessageCounterAsHTML" displayName="list message counter in HTML" description="List the message counters in HTML.">
+ <results>
+ <c:simple-property name="operationResult" description="Message Counters."/>
+ </results>
+ </operation>
+ <operation name="listMessageCounterHistory" displayName="list message counter history" description="List the message counters history.">
+ <results>
+ <c:simple-property name="operationResult" description="Message Counter history."/>
+ </results>
+ </operation>
+ <operation name="listMessageCounterHistoryAsHTML" displayName="list message counter history in HTML" description="List the message counters history in HTML.">
+ <results>
+ <c:simple-property name="operationResult" description="Message Counter history."/>
+ </results>
+ </operation>
+ <operation name="pause" displayName="pause the queue" description="Pause the queue.">
+ </operation>
+ <operation name="resume" displayName="resume the queue" description="Resume the queue.">
+ </operation>
<metric property="Name"
displayName="Name"
description="name of this queue"
More information about the jboss-cvs-commits
mailing list