示例#1
0
 public void connectionEstablished(DownloadConnection downloadConnection) {
   connections.put(downloadConnection.getRemoteFriend(), downloadConnection);
   if (T.t) {
     T.trace(
         "Connection established: " + downloadConnection + " connections: " + connections.size());
   }
 }
示例#2
0
 public void removeConnection(DownloadConnection downloadConnection) throws IOException {
   connections.remove(downloadConnection.getRemoteFriend());
   if (connections.size() == 0 && isComplete()) {
     if (T.t) {
       T.info("Download is complete");
     }
     manager.downloadComplete(this);
   }
 }
示例#3
0
 public void addConnection(DownloadConnection con) {
   connections.put(con.getRemoteFriend(), con);
 }