コード例 #1
0
  @Inject
  public TorrentDownloadListener(
      DownloadManager downloadManager,
      ActivityCallback activityCallback,
      @GnutellaFiles FileCollection gnutellaFileList,
      TorrentManager torrentManager,
      @Assisted List<DownloadItem> downloadItems,
      @Assisted Downloader downloader) {
    this.downloader = Objects.nonNull(downloader, "downloader");
    this.downloadManager = Objects.nonNull(downloadManager, "downloadManager");
    this.torrentManager = Objects.nonNull(torrentManager, "torrentManager");
    this.gnutellaFileList = Objects.nonNull(gnutellaFileList, "gnutellaFileList");
    this.activityCallback = Objects.nonNull(activityCallback, "activityCallback");
    this.downloadItems = Objects.nonNull(downloadItems, "downloadItems");

    if (downloader.getState() == DownloadState.COMPLETE) {
      if (downloader instanceof CoreDownloader) {
        handleEvent(new DownloadStateEvent((CoreDownloader) downloader, DownloadState.COMPLETE));
      }
    }
  }
コード例 #2
0
 public AbstractTableFormat(String... columnNames) {
   // if this throws, this could also mean you implicitly used the default
   // constructor
   this.columnNames = Objects.nonNull(columnNames, "columnNames");
 }
コード例 #3
0
 public RemoteFileDescContext(RemoteFileDesc remoteFileDesc) {
   this.remoteFileDesc = Objects.nonNull(remoteFileDesc, "remoteFileDesc");
 }
コード例 #4
0
 public LimeXMLTorrentTracker(URI trackerUri) {
   this.trackerUri = Objects.nonNull(trackerUri, "trackerUri");
 }