Package org.gudy.azureus2.plugins

Examples of org.gudy.azureus2.plugins.PluginInterface


    }
  }

  private File getAliasesFile()
  {
    PluginInterface pi = azureus_core.getPluginManager().getDefaultPluginInterface();
    String azureusUserDir = pi.getUtilities().getAzureusUserDir();
    return new File(azureusUserDir, ALIASES_CONFIG_FILE);
  }
View Full Code Here


           
            return( true );
          }
      });
   
    PluginInterface  pi = pm.getPluginInterfaceByClass( CorePatchChecker.class );
   
    if ( pi != null ){
     
      pi.getPluginState().setDisabled( true );
    }
   
    pi = pm.getPluginInterfaceByClass( UpdaterUpdateChecker.class );
   
    if ( pi != null ){
     
      pi.getPluginState().setDisabled( true );
    }
   
    UpdateManager update_manager = azureus_core.getPluginManager().getDefaultPluginInterface().getUpdateManager();
   
    UpdateCheckInstance  checker = update_manager.createUpdateCheckInstance();
View Full Code Here

        class_mon.exit();
      }   
     
      for ( Object[] entry: to_fire ){

      PluginInterface pi = (PluginInterface)entry[1];
       
      String name = pi.getPluginName();
       
      if ( init != null ){
         
        init.reportCurrentTask(MessageText.getString("splash.plugin.UIinit",new String[] {name}));
         
View Full Code Here

      }
     
     
      synchronized (PluginDeprecation.class) {
        if (model == null) {
          final PluginInterface pi = PluginInitializer.getDefaultInterface();
          model = pi.getUIManager().createBasicPluginViewModel(MessageText.getString("PluginDeprecation.view"));
          model.getStatus().setVisible(false);
          model.getProgress().setVisible(false);
          model.getActivity().setVisible(false);
          model.getLogArea().appendText(
            MessageText.getString("PluginDeprecation.log.start", new String[] {
              Constants.isCVSVersion() ? FORUM_BETA_LINK : FORUM_STABLE_LINK
            })
          );
         
          // Force it to be auto-opened.
          UIManagerListener uiml = new UIManagerListener() {
            public void UIAttached(UIInstance inst) {
              if (inst instanceof UISWTInstance) {
                ((UISWTInstance)inst).openView(model);
                pi.getUIManager().removeUIListener(this);
              }
            }
            public void UIDetached(UIInstance inst) {}
          };
          pi.getUIManager().addUIListener(uiml);
        }

        String log_details = MessageText.getString(
          "PluginDeprecation.log.details",
          new String[] {identifier, context, Debug.getStackTrace(false, false)}
View Full Code Here

        return;
      }
     
        // we need an up-to-date version of this to do the migration...
     
      PluginInterface pi = azureus_core.getPluginManager().getPluginInterfaceByID( "azupdater" );
           
      if ( pi != null && Constants.compareVersions( pi.getPluginVersion(), "1.8.15" ) >= 0 ){
             
        new AEThread2( "win32.vmo", true )
        {
          public void
          run()
View Full Code Here

    throws Exception
  {
      // we don't want our update to interfere with the normal update process so
      // hang around until it completes
   
    PluginInterface pi = azureus_core.getPluginManager().getDefaultPluginInterface();
   
    UpdateManager update_manager = pi.getUpdateManager();
   
    final List<UpdateCheckInstance>  l_instances = new ArrayList<UpdateCheckInstance>();
   
    update_manager.addListener(
      new UpdateManagerListener()
      {
        public void
        checkInstanceCreated(
          UpdateCheckInstance  instance )
        {
          synchronized( l_instances ){
           
            l_instances.add( instance );
          }
        }
      });
   
    UpdateCheckInstance[] instances = update_manager.getCheckInstances();
   
    l_instances.addAll( Arrays.asList( instances ));
   
    long start = SystemTime.getMonotonousTime();
   
    while( true ){
     
      if ( SystemTime.getMonotonousTime() - start >= 5*60*1000 ){
       
        break;
      }
     
      try{
        Thread.sleep(5000);
       
      }catch( Throwable e ){
       
        Debug.out( e );
       
        return( null );
      }
     
      if ( l_instances.size() > 0 ){
     
        boolean  all_done = true;
       
        for ( UpdateCheckInstance instance: l_instances ){
         
          if ( !instance.isCompleteOrCancelled()){
           
            all_done = false;
           
            break;
          }
        }
       
        if ( all_done ){
         
          break;
        }
      }
    }
   
    if ( update_manager.getInstallers().length > 0 ){
     
      return( null );
    }
   
    UpdateInstaller installer = pi.getUpdateManager().createInstaller();
 
    return( installer );
  }
View Full Code Here

          if (filename_id != null) {
         
            id       = filename_id;             
            version    = filename_version;
                     
            PluginInterface pi = installer.getPluginManager().getPluginInterfaceByID( id );

            ok =    pi != null &&
                pi.getPluginDirectoryName() == null ||
                    pi.getPluginDirectoryName().length() == 0 );
          }
         
          if ( !ok ){
         
            throw( new PluginException( "Mandatory file 'plugin.properties' not found in plugin file" ));
          }
        }else{ // properties != null
       
          // unfortunately plugin.id isn't mandatory for the properties, and neither is plugin.version
       
          PluginInitializer.checkJDKVersion( "", properties, false );
          PluginInitializer.checkAzureusVersion("", properties, false);
         
          id    = properties.getProperty( "plugin.id" );
          version  = properties.getProperty( "plugin.version" );
         
          // Force both versions to be the same if they are both defined.
          String prop_version = version;
          if (prop_version != null && filename_version != null && !filename_version.equals(prop_version)) {
              throw new PluginException("inconsistent versions [file=" + filename_version + ", prop=" + prop_version + "]");
          }

        }
       
        if ( id == null ){
         
          // see if plugin is already loaded, if so we can get the id from it
         
          String  plugin_class = properties.getProperty("plugin.class");
         
          if ( plugin_class == null ){
           
            String  plugin_classes = properties.getProperty( "plugin.classes" );
           
            if ( plugin_classes != null ){
             
              int  semi_pos = plugin_classes.indexOf(";");
             
              if ( semi_pos == -1 ){
               
                plugin_class  = plugin_classes;
               
              }else{
               
                plugin_class = plugin_classes.substring( 0, semi_pos );
              }
            }
          }
         
          if ( plugin_class != null ){
           
            try{
              PluginInterface pi = installer.getPluginManager().getPluginInterfaceByClass( plugin_class );
             
              if ( pi != null ){
               
                id  = pi.getPluginID();
              }
            }catch( Throwable ignore ){
             
            }
          }
View Full Code Here

    try{
      class_mon.enter();
     
      if( dht_use_accessor == null ){
           
      PluginInterface dht_pi =
          azureus_core.getPluginManager().getPluginInterfaceByClass(
                DHTPlugin.class );
           
        if ( dht_pi != null ){
         
          dht_use_accessor = (DHTPlugin)dht_pi.getPlugin();
         
          if ( dht_use_accessor.isEnabled()){
           
            dht_use_accessor.addListener(
              new DHTPluginListener()
View Full Code Here

        return pi.getPlugin() instanceof UnloadablePlugin;
    }
       
      List pis = PluginInitializer.getPluginInterfaces();
    for (int i=0;i<pis.size();i++) {
        PluginInterface  pi = (PluginInterface)pis.get(i);
        String other_dir = pi.getPluginDirectoryName();
        if (other_dir == null || other_dir.length() == 0) {continue;}
        if (dir.equals(other_dir)) {
          if (!(pi.getPlugin() instanceof UnloadablePlugin)) {
            return false;
         
        }
    }
       
View Full Code Here

 
    throws TorrentException
  {
    if ( magnet_plugin == null ){
     
      PluginInterface magnet_pi = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByClass( MagnetPlugin.class );
     
      if ( magnet_pi != null ){
     
         magnet_plugin = (MagnetPlugin)magnet_pi.getPlugin();
      }
    }
   
    if ( magnet_plugin == null ){
     
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.PluginInterface

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.