/**
* Codes a <code>ClusterDestination</code> as a Hashtable for
* travelling through the SOAP protocol.
*/
public Hashtable code() {
Hashtable h = new Hashtable();
Map.Entry entries[] = new Map.Entry [cluster.size()];
cluster.entrySet().toArray(entries);
StringBuffer strbuf = new StringBuffer(20);
for (int i=0; i<entries.length; i++) {
strbuf.setLength(0);
strbuf.append("cluster#").append(i).append(".key");
h.put(strbuf.toString(), (String) entries[i].getKey());
Destination dest = (Destination) entries[i].getValue();
strbuf.setLength(0);
strbuf.append("cluster#").append(i).append(".destName");
h.put(strbuf.toString(), dest.getName());
}
return h;
}