[
https://issues.apache.org/jira/browse/QUARKS-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15222455#comment-15222455
]
ASF GitHub Bot commented on QUARKS-106:
---------------------------------------
Github user ddebrunner commented on a diff in the pull request:
https://github.com/apache/incubator-quarks/pull/66#discussion_r58276512
--- Diff:
runtime/jmxcontrol/src/main/java/quarks/runtime/jmxcontrol/JMXControlService.java
---
@@ -127,29 +126,40 @@ public void unregister(String controlId) {
}
@Override
- public <T> Set<T> getControls(Class<T> controlInterface) {
+ public <T> T getControl(String type, String alias, Class<T>
controlInterface) {
try {
MBeanServer mBeanServer = getMbs();
- Set<ObjectName> names =
getObjectNamesForInterface(controlInterface.getName());
+ Set<ObjectName> names = getObjectNamesForInterface(type,
alias, controlInterface.getName());
+
+ if (names.isEmpty())
+ return null;
+ if (names.size() != 1)
+ throw new RuntimeException("Alias " + alias + " not unique
for type " + type);
--- End diff --
I'm just changing getControls() in this pull request. It only expects a
single MBean registered, so if it finds more it complains.
> Implement JsonControlService.getControls()
> ------------------------------------------
>
> Key: QUARKS-106
> URL: https://issues.apache.org/jira/browse/QUARKS-106
> Project: Quarks
> Issue Type: Task
> Components: API
> Reporter: Victor Dogaru
> Assignee: Daniel John Debrunner
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)