Skip to content

Commit

Permalink
ARTEMIS-1540 Missing management annotations
Browse files Browse the repository at this point in the history
Some of the management operations are not properly annotated.
Also need to add an Operation to list divert names.
  • Loading branch information
howardgao authored and ig-michaelpearce committed Dec 8, 2017
1 parent de355e9 commit 2f29933
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Expand Up @@ -631,7 +631,9 @@ default Map<String, Object> toMap() {
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;
}
Expand Down
Expand Up @@ -591,6 +591,7 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
* @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,
Expand Down Expand Up @@ -811,6 +812,7 @@ boolean closeConsumerWithID(@Parameter(desc = "The session ID", name = "sessionI
@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;

/**
Expand Down Expand Up @@ -1000,6 +1002,7 @@ void addAddressSettings(@Parameter(desc = "an address match", name = "addressMat
@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;

/**
Expand All @@ -1011,6 +1014,15 @@ void addAddressSettings(@Parameter(desc = "an address match", name = "addressMat
@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,
Expand Down
Expand Up @@ -493,6 +493,7 @@ int changeMessagesPriority(@Parameter(name = "filter", desc = "A message filter
* 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();

}

0 comments on commit 2f29933

Please sign in to comment.