}
@Override
protected Object handleOperation(String operationName, OperationContext context, ModelNode operation) throws OperationFailedException {
if (GET_STATIC_CONNECTORS_AS_JSON.equals(operationName)) {
ClusterConnectionControl control = getHornetQComponentControl(context, operation, false);
try {
context.getResult().set(control.getStaticConnectorsAsJSON());
} catch (Exception e) {
context.getFailureDescription().set(e.getLocalizedMessage());
}
} else if (GET_NODES.equals(operationName)) {
ClusterConnectionControl control = getHornetQComponentControl(context, operation, false);
try {
Map<String, String> nodes = control.getNodes();
final ModelNode result = context.getResult();
result.setEmptyObject();
for (Map.Entry<String, String> entry : nodes.entrySet()) {
result.get(entry.getKey()).set(entry.getValue());
}