Use numeric IDs rather than names to identify transports.

This commit is contained in:
akwizgran
2011-09-29 15:40:09 +01:00
parent c77b4e5b91
commit 7190509ede
20 changed files with 164 additions and 169 deletions

View File

@@ -20,13 +20,13 @@ class TransportWriterImpl implements TransportWriter {
w = writerFactory.createWriter(out);
}
public void writeTransports(Map<String, Map<String, String>> transports,
public void writeTransports(Map<Integer, Map<String, String>> transports,
long timestamp) throws IOException {
w.writeUserDefinedId(Types.TRANSPORT_UPDATE);
w.writeListStart();
for(Entry<String, Map<String, String>> e : transports.entrySet()) {
for(Entry<Integer, Map<String, String>> e : transports.entrySet()) {
w.writeUserDefinedId(Types.TRANSPORT_PROPERTIES);
w.writeString(e.getKey());
w.writeInt32(e.getKey());
w.writeMap(e.getValue());
}
w.writeListEnd();