public TabularData listEips() throws Exception {
try {
// find all EIPs
Map<String, Properties> eips = context.findEips();
TabularData answer = new TabularDataSupport(CamelOpenMBeanTypes.listEipsTabularType());
// gather EIP detail for each eip
for (Map.Entry<String, Properties> entry : eips.entrySet()) {
String name = entry.getKey();
String title = (String) entry.getValue().get("title");
String description = (String) entry.getValue().get("description");
String label = (String) entry.getValue().get("label");
String type = (String) entry.getValue().get("class");
String status = CamelContextHelper.isEipInUse(context, name) ? "in use" : "on classpath";
CompositeType ct = CamelOpenMBeanTypes.listEipsCompositeType();
CompositeData data = new CompositeDataSupport(ct, new String[]{"name", "title", "description", "label", "status", "type"},
new Object[]{name, title, description, label, status, type});
answer.put(data);
}
return answer;
} catch (Exception e) {
throw ObjectHelper.wrapRuntimeCamelException(e);
}
}
ManagedCamelContext.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Camel
作者:
评论列表
文章目录