Package org.gudy.azureus2.plugins

Examples of org.gudy.azureus2.plugins.PluginInterface.addListener()


        CategoryManager.addCategoryManagerListener(MyTorrentsView.this);
        globalManager.addListener(MyTorrentsView.this, false);
        DownloadManager[] dms = (DownloadManager[]) globalManager.getDownloadManagers().toArray(new DownloadManager[0]);
        for (int i = 0; i < dms.length; i++) {
          DownloadManager dm = dms[i];
          dm.addListener(MyTorrentsView.this);
          if (!isOurDownloadManager(dm)) {
            dms[i] = null;
          }
        }
        tv.addDataSources(dms);
View Full Code Here


          {
            if ( comp instanceof GlobalManager ){
             
              GlobalManager  gm  = (GlobalManager)comp;
             
              gm.addListener( PluginInitializer.this );
            }
          }
      });
   
    core_operation   = _core_operation;
View Full Code Here

            }
          });
        }
      }
    };
    gm.addListener(gmListener, false);
   
    UIFunctionsManagerSWT.getUIFunctionsSWT().getUIUpdater().addUpdater(this);
  }
 
  private void dataSourceChanged(Object newDataSource) {
View Full Code Here

      if ( !gm_listener_added ){
       
        gm_listener_added = true;
       
        GlobalManager gm = AzureusCoreFactory.getSingleton().getGlobalManager();
        gm.addListener(new GlobalManagerAdapter() {
          public void downloadManagerRemoved(DownloadManager dm) {
            dms.remove(dm);
          }
        }, false);
      }
View Full Code Here

    String pieceSizeStr = (String) parameters.get("force_piece_size_pow2");
    if(pieceSizeStr != null) {
      try {    
        long pieceSize = 1l << Integer.parseInt(pieceSizeStr);
        TOTorrentCreator creator = TOTorrentFactory.createFromFileOrDirWithFixedPieceLength(fSrc,url,pieceSize);
        creator.addListener( this );
        torrent = creator.create();
      }catch(Exception e) {
        e.printStackTrace();
        return;
      }
View Full Code Here

        return;
      }
    } else {
      try {
        TOTorrentCreator creator = TOTorrentFactory.createFromFileOrDirWithComputedPieceLength(fSrc,url);
        creator.addListener( this );
        torrent = creator.create();
      } catch(Exception e) {
        e.printStackTrace();
        return;
      }
View Full Code Here

  {
    PluginInterface default_pi = PluginInitializer.getDefaultInterface();

    mi_ta = default_pi.getTorrentManager().getPluginAttribute( "sm_metainfo" );
   
    default_pi.addListener(
      new PluginListener()
      {
        public void
        initializationComplete()
        {
View Full Code Here

     
      getExtensions( fm, true );
     
    }else{
     
      pi.addListener(
        new PluginListener()
        {
          public void
          initializationComplete()
          {
View Full Code Here

   
    final PluginManager pm = azureus_core.getPluginManager();
   
    final PluginInterface default_pi = pm.getDefaultPluginInterface();
   
    default_pi.addListener(
      new PluginListener()
      {
        public void
        initializationComplete()
        {
View Full Code Here

      // share manager init is async so we need to deal with this
      PluginInterface default_pi = PluginInitializer.getDefaultInterface();
      try {
        final ShareManager share_manager = default_pi.getShareManager();

        default_pi.addListener(new PluginListener() {
          public void initializationComplete() {
          }

          public void closedownInitiated() {
            int share_count = share_manager.getShares().length;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.