return createMethodResponse(from, null, type, results);
}
public ClusterElement createMethodResponse(String from, String to,
String type, Map<String, String> results) {
Element result_el = elem.clone();
result_el.setAttribute("from", from);
result_el.setAttribute("to", (to != null ? to : first_node));
result_el.setAttribute("type", type);
Element res = new Element(CLUSTER_METHOD_RESULTS_EL_NAME);
result_el.findChild(CLUSTER_METHOD_PATH).addChild(res);
ClusterElement result_cl = new ClusterElement(result_el);
if (results != null) {
for (Map.Entry<String, String> entry: results.entrySet()) {
result_cl.addMethodResult(entry.getKey(), entry.getValue());