TabularType tableType = new TabularType("Event Handlers", "Table of Karaf Cellar cluster event handlers",
compositeType, new String[]{ "node", "handler" });
TabularDataSupport table = new TabularDataSupport(tableType);
for (Map.Entry<Node, ManageHandlersResult> handlersResultEntry : results.entrySet()) {
Node node = handlersResultEntry.getKey();
ManageHandlersResult result = handlersResultEntry.getValue();
if (result != null && result.getHandlers() != null) {
for (Map.Entry<String, String> handlerEntry : result.getHandlers().entrySet()) {
String handler = handlerEntry.getKey();
String status = handlerEntry.getValue();
CompositeDataSupport data = new CompositeDataSupport(compositeType,
new String[]{ "node", "handler", "status" },
new Object[]{ node.getId(), handler, status });
table.put(data);
}
}
}