Package org.jmule.core.sharingmanager

Examples of org.jmule.core.sharingmanager.SharingManager


      protected Menu getPopUpMenu() {
        if (getItemCount() == 0)
          return no_items_menu;
        int download_status = NO_FILE;

        SharingManager sharing_manager = _core.getSharingManager();
        DownloadManager download_manager = _core.getDownloadManager();

        for (SearchResultItem item : getSelectedObjects()) {
          if (download_manager.hasDownload(item.getFileHash())) {
            try {
              if (!download_manager.getDownload(
                  item.getFileHash()).isStarted()) {
                download_status = DOWNLOAD_FILE;
              } else {
                download_status = SHARED_FILE;
              }
            } catch (DownloadManagerException e) {
              e.printStackTrace();
            }
            break;
          }
          if (sharing_manager.hasFile(item.getFileHash())) {
            download_status = SHARED_FILE;
          }
        }
        switch (download_status) {
        case NO_FILE: {
View Full Code Here


    filesToPublishChecker = new Task() {
      Set<FileHash> publishedFiles = new HashSet<FileHash>();

      public void run() {
        if (getStatus() != JKadStatus.CONNECTED) return;
        SharingManager sharing_manager = SharingManagerSingleton
            .getInstance();
        Publisher publisher = Publisher.getInstance();
        ConfigurationManager config_manager = ConfigurationManagerSingleton
            .getInstance();
        Iterable<SharedFile> shared_files = sharing_manager
            .getSharedFiles();
        long filesToPublish = 0;
        for (SharedFile file : shared_files) {
          if (publisher.getPublishKeywordCount() > JKadConstants.MAX_CONCURRENT_PUBLISH_FILES) {
            break;
View Full Code Here

    ip_filter.initialize();
    ip_filter.start();
   
    notifyComponentStarted( ip_filter );
   
    SharingManager sharingManager = SharingManagerSingleton.getInstance();
    sharingManager.initialize();
    sharingManager.start();
   
    sharingManager.loadCompletedFiles();
    sharingManager.loadPartialFiles();
   
    // notifies that the sharing manager has been started
    notifyComponentStarted(sharingManager);
   
    UploadManagerSingleton.getInstance().initialize();
View Full Code Here

TOP

Related Classes of org.jmule.core.sharingmanager.SharingManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.