}
return null;
}
public IExchange toExchange(CompositeData data) {
Message message = new Message();
Map<String, Object> headers = message.getHeaders();
Set<String> keySet = data.getCompositeType().keySet();
for (String key : keySet) {
Object value = data.get(key);
// ActiveMQJMXPlugin.getLogger().debug("Key: " + key + " value " + value);
if (ignoredKeys.contains(key)) {
continue;
}
boolean nestedProperty = nestedProperties.contains(key);
if (nestedProperty && value instanceof TabularData) {
TabularData td = (TabularData) value;
Map<String, Object> map = toMap(td);
putAllNonNull(headers, map);
} else if (nestedProperty && value instanceof Map) {
Map<String, Object> map = (Map<String, Object>) value;
putAllNonNull(headers, map);
} else if (bodyKeys.contains(key)) {
message.setBody(value);
} else if (value != null) {
headers.put(key, value);
}
}
Set<Entry<String, Object>> entrySet = headers.entrySet();