ARTEMIS-1540 Missing management annotations

Some of the management operations are not properly annotated.
Also need to add an Operation to list divert names.
This commit is contained in:
Howard Gao 2017-12-06 13:00:42 +08:00 committed by Michael Pearce
parent de355e9bd1
commit 2f29933446
3 changed files with 16 additions and 1 deletions

View File

@ -631,7 +631,9 @@ public interface Message {
default Map<String, Object> toPropertyMap() {
Map map = new HashMap<>();
for (SimpleString name : getPropertyNames()) {
map.put(name.toString(), getObjectProperty(name.toString()));
//some property is SimpleString, which is not available for management console
Object value = getObjectProperty(name.toString());
map.put(name.toString(), value == null ? null : value.toString());
}
return map;
}

View File

@ -591,6 +591,7 @@ public interface ActiveMQServerControl {
* @return a textual summary of the queue
* @throws Exception
*/
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
String createQueue(@Parameter(name = "address", desc = "Address of the queue") String address,
@Parameter(name = "routingType", desc = "The routing type used for this address, MULTICAST or ANYCAST") String routingType,
@Parameter(name = "name", desc = "Name of the queue") String name,
@ -811,6 +812,7 @@ public interface ActiveMQServerControl {
@Operation(desc = "List all the connection IDs", impact = MBeanOperationInfo.INFO)
String[] listConnectionIDs() throws Exception;
@Operation(desc = "List all producers", impact = MBeanOperationInfo.INFO)
String listProducersInfoAsJSON() throws Exception;
/**
@ -1000,6 +1002,7 @@ public interface ActiveMQServerControl {
@Parameter(desc = "allow topics to be created automatically", name = "autoCreateAddresses") boolean autoCreateAddresses,
@Parameter(desc = "allow auto-created topics to be deleted automatically", name = "autoDeleteAddresses") boolean autoDeleteAddresses) throws Exception;
@Operation(desc = "Remove address settings", impact = MBeanOperationInfo.ACTION)
void removeAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch) throws Exception;
/**
@ -1011,6 +1014,15 @@ public interface ActiveMQServerControl {
@Attribute(desc = "names of the diverts deployed on this server")
String[] getDivertNames();
/**
* Jon plugin doesn't recognize an Operation whose name is in
* form getXXXX(), so add this one.
*/
@Operation(desc = "names of the diverts deployed on this server", impact = MBeanOperationInfo.INFO)
default String[] listDivertNames() {
return getDivertNames();
}
@Operation(desc = "Create a Divert", impact = MBeanOperationInfo.ACTION)
void createDivert(@Parameter(name = "name", desc = "Name of the divert") String name,
@Parameter(name = "routingName", desc = "Routing name of the divert") String routingName,

View File

@ -493,6 +493,7 @@ public interface QueueControl {
* any other measure.
* It is useful if you need the exact number of counts on a message
*/
@Operation(desc = "Flush internal executors", impact = MBeanOperationInfo.ACTION)
void flushExecutor();
}