@Test public void testGetStreamContextForUnknownTransport() throws Exception { assertEquals(null, keyManager.getStreamContext(contactId, unknownTransportId)); }
@Override public StreamContext getStreamContext(ContactId c, TransportId t) throws DbException { if (!activeContacts.containsKey(c)) return null; TransportKeyManager m = managers.get(t); if (m == null) { if (LOG.isLoggable(INFO)) LOG.info("No key manager for " + t); return null; } StreamContext ctx; Transaction txn = db.startTransaction(false); try { ctx = m.getStreamContext(txn, c); db.commitTransaction(txn); } finally { db.endTransaction(txn); } return ctx; }
KeyManagerImpl implements KeyManager, Service, EventListener { @Override public StreamContext getStreamContext(ContactId c, TransportId t) throws DbException { if (!activeContacts.containsKey(c)) return null; TransportKeyManager m = managers.get(t); if (m == null) { if (LOG.isLoggable(INFO)) LOG.info("No key manager for " + t); return null; } StreamContext ctx; Transaction txn = db.startTransaction(false); try { ctx = m.getStreamContext(txn, c); db.commitTransaction(txn); } finally { db.endTransaction(txn); } return ctx; } }
KeyManagerImpl implements KeyManager, Service, EventListener { @Override public StreamContext getStreamContext(ContactId c, TransportId t) throws DbException { if (!activeContacts.containsKey(c)) return null; TransportKeyManager m = managers.get(t); if (m == null) { if (LOG.isLoggable(INFO)) LOG.info("No key manager for " + t); return null; } StreamContext ctx; Transaction txn = db.startTransaction(false); try { ctx = m.getStreamContext(txn, c); db.commitTransaction(txn); } finally { db.endTransaction(txn); } return ctx; } @Inject  KeyManagerImpl(DatabaseComponent db, @DatabaseExecutor Executor dbExecutor,
			PluginConfig pluginConfig,
			TransportKeyManagerFactory transportKeyManagerFactory); }
KeyManagerImpl implements KeyManager, Service, EventListener { @Override public StreamContext getStreamContext(ContactId c, TransportId t) throws DbException { if (!activeContacts.containsKey(c)) return null; TransportKeyManager m = managers.get(t); if (m == null) { if (LOG.isLoggable(INFO)) LOG.info("No key manager for " + t); return null; } StreamContext ctx; Transaction txn = db.startTransaction(false); try { ctx = m.getStreamContext(txn, c); db.commitTransaction(txn); } finally { db.endTransaction(txn); } return ctx; } @Inject  KeyManagerImpl(DatabaseComponent db, @DatabaseExecutor Executor dbExecutor,
			PluginConfig pluginConfig,
			TransportKeyManagerFactory transportKeyManagerFactory); @Override void startService(); @Override void stopService(); @Override Map<TransportId, KeySetId> addContact(Transaction txn, ContactId c,
			SecretKey master, long timestamp, boolean alice, boolean active); @Override void activateKeys(Transaction txn, Map<TransportId, KeySetId> keys); @Override boolean canSendOutgoingStreams(ContactId c, TransportId t); @Override StreamContext getStreamContext(ContactId c, TransportId t); @Override StreamContext getStreamContext(TransportId t, byte[] tag); @Override void eventOccurred(Event e); }
KeyManagerImpl implements KeyManager, Service, EventListener { @Override public StreamContext getStreamContext(ContactId c, TransportId t) throws DbException { if (!activeContacts.containsKey(c)) return null; TransportKeyManager m = managers.get(t); if (m == null) { if (LOG.isLoggable(INFO)) LOG.info("No key manager for " + t); return null; } StreamContext ctx; Transaction txn = db.startTransaction(false); try { ctx = m.getStreamContext(txn, c); db.commitTransaction(txn); } finally { db.endTransaction(txn); } return ctx; } @Inject  KeyManagerImpl(DatabaseComponent db, @DatabaseExecutor Executor dbExecutor,
			PluginConfig pluginConfig,
			TransportKeyManagerFactory transportKeyManagerFactory); @Override void startService(); @Override void stopService(); @Override Map<TransportId, KeySetId> addContact(Transaction txn, ContactId c,
			SecretKey master, long timestamp, boolean alice, boolean active); @Override void activateKeys(Transaction txn, Map<TransportId, KeySetId> keys); @Override boolean canSendOutgoingStreams(ContactId c, TransportId t); @Override StreamContext getStreamContext(ContactId c, TransportId t); @Override StreamContext getStreamContext(TransportId t, byte[] tag); @Override void eventOccurred(Event e);  }