}
return parts;
}
public Map<String, Object> signMessageHeaders(Message<?> message) {
MessageHeaders headers = message.getHeaders();
String url = headers.get(SignatureHelper.URL_X_HEADER, String.class);
Map<String, Object> newheaders = new HashMap<String, Object>();
newheaders.put("Accept", "*/*");
newheaders.put(SignatureHelper.URL_X_HEADER, url);
newheaders.put(SignatureHelper.USER_HEADER, "notification");
newheaders.put(SignatureHelper.TIMESTAMP_HEADER, "\"" + System.currentTimeMillis() + "\"");
//sign only those headers that are Strings
Map<String, List<String>> stringHeaders = new HashMap<String, List<String>>();
for (String key : headers.keySet()) {
if (headers.get(key) instanceof String) {
List<String> ss = new ArrayList<String>();
ss.add(headers.get(key, String.class));
stringHeaders.put(key, ss);
}
newheaders.put(key, headers.get(key));
}
try {
log.debug("HEADERS -> " + stringHeaders + ":" + url + ":" + "notification");