Protocol Buffers will be used for the wire protocol. As a quick test it's now used to serialize transport details when creating an invitation.

This commit is contained in:
akwizgran
2011-07-07 22:10:02 +01:00
parent 7fb589075d
commit 4deb52478d
11 changed files with 1212 additions and 17 deletions

View File

@@ -296,6 +296,20 @@ class SynchronizedDatabaseComponent<Txn> extends DatabaseComponentImpl<Txn> {
}
}
public Map<String, String> getTransports() throws DbException {
synchronized(transportLock) {
Txn txn = db.startTransaction();
try {
Map<String, String> transports = db.getTransports(txn);
db.commitTransaction(txn);
return transports;
} catch(DbException e) {
db.abortTransaction(txn);
throw e;
}
}
}
public Map<String, String> getTransports(ContactId c) throws DbException {
synchronized(contactLock) {
if(!containsContact(c)) throw new NoSuchContactException();