Package org.gudy.azureus2.plugins

Examples of org.gudy.azureus2.plugins.PluginInterface


  public void
  setPluginStringProperty(
    String    name,
    String    value )
  {
    PluginInterface  p = pi;
   
    if ( p == null ){
   
      p = UtilitiesImpl.getPluginThreadContext()
    }
   
    if ( p == null ){
     
      name = "<internal>." + name;
     
    }else{
     
      name = p.getPluginID() + "." + name;
    }
   
    TorrentUtils.setPluginStringProperty( torrent, name, value );
  }
View Full Code Here


 
  public String
  getPluginStringProperty(
    String    name )
  {
    PluginInterface  p = pi;
   
    if ( p == null ){
   
      p = UtilitiesImpl.getPluginThreadContext()
    }
   
    if ( p == null ){
     
      name = "<internal>." + name;
     
    }else{
     
      name = p.getPluginID() + "." + name;
    }
   
    return( TorrentUtils.getPluginStringProperty( torrent, name ));
  }
View Full Code Here

         
            // dht
         
          try{
           
          PluginInterface dht_pi = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByClass(DHTTrackerPlugin.class);
 
              if ( dht_pi != null ){
               
                tps.add(((DHTTrackerPlugin)dht_pi.getPlugin()).getTrackerPeerSource( PluginCoreUtils.wrap( this )));
              }
        }catch( Throwable e ){
          }
         
          // LAN
       
        try{
         
          PluginInterface lt_pi = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByClass(LocalTrackerPlugin.class);
 
          if ( lt_pi != null ){
           
                tps.add(((LocalTrackerPlugin)lt_pi.getPlugin()).getTrackerPeerSource( PluginCoreUtils.wrap( this )));
         
          }
         
        }catch( Throwable e ){
         
View Full Code Here

        new AEThread2( "torrentAdder", true )
        {
          public void
          run()
          {
            PluginInterface pi = plugin.getPluginInterface();
           
            String msg = pi.getUtilities().getLocaleUtilities().getLocalisedMessageText(
                "azbuddy.addtorrent.msg",
                new String[]{ from_buddy.getName(), torrent.getName() });
           
            long res = pi.getUIManager().showMessageBox(
                    "azbuddy.addtorrent.title",
                    "!" + msg + "!",
                    UIManagerEvent.MT_YES | UIManagerEvent.MT_NO );
           
            if ( res == UIManagerEvent.MT_YES ){
           
              pi.getUIManager().openTorrent( torrent );
            }
          }
        }.start();
       
        reply.put( "type", new Long( RT_AZ2_REPLY_SEND_TORRENT ));
View Full Code Here

    transient_seed    = getBooleanParam( _params, "transient", false );

    requests_mon  = plugin.getPluginInterface().getUtilities().getMonitor();
    request_sem    = plugin.getPluginInterface().getUtilities().getSemaphore();
   
    PluginInterface  pi = plugin.getPluginInterface();
   
    user_agent = pi.getAzureusName();
   
    try{
      Properties  props = new Properties();
   
      pi.getClientIDManager().getGenerator().generateHTTPProperties( props );
     
      String ua = props.getProperty( ClientIDGenerator.PR_USER_AGENT );
     
      if ( ua != null ){
       
View Full Code Here

    boolean    update_only,
    boolean    no_wait )
 
    throws AzureusCoreException
  {
    PluginInterface pi = azureus_core.getPluginManager().getPluginInterfaceByID( "azupdater" );
   
    if ( pi == null ){
      Logger.log(new LogAlert(LogAlert.UNREPEATABLE, LogAlert.AT_ERROR,
          "Can't update/restart, mandatory plugin 'azupdater' not found"));
     
      throw( new AzureusCoreException( "mandatory plugin 'azupdater' not found" ));
    }
   
    String  updater_dir = pi.getPluginDirectoryName();
   
    classpath_prefix = updater_dir + File.separator + UPDATER_JAR;
   
      String  app_path = SystemProperties.getApplicationPath();
     
View Full Code Here

              int  type = ev.getType();
             
              if (   type == PluginEvent.PEV_PLUGIN_OPERATIONAL ||
                  type == PluginEvent.PEV_PLUGIN_NOT_OPERATIONAL ){
               
                PluginInterface pi = (PluginInterface)ev.getValue();
     
                if ( pi.getPluginID().equals( "azupnpav" )){
       
                  if ( type == PluginEvent.PEV_PLUGIN_OPERATIONAL ){
                 
                    upnpav_ipc = pi.getIPC();

                    addListener( pi );
                   
                  }else{
                   
                    upnpav_ipc = null;
                  }
                }
              }
            }
          });
     
      PluginInterface pi = plugin_interface.getPluginManager().getPluginInterfaceByID( "azupnpav" );

      if ( pi == null ){
       
        manager.log( "No UPnPAV plugin found" );
       
      }else{
       
        upnpav_ipc = pi.getIPC();
       
        addListener( pi );
      }     
    }catch( Throwable e ){
     
View Full Code Here

      }else if ( service_type.equals( "urn:schemas-upnp-org:service:VuzeOfflineDownloaderService:1" )){
       
          // ignore local offline downloader
       
        try{
          PluginInterface od_pi = plugin_interface.getPluginManager().getPluginInterfaceByID( "azofflinedownloader" );
 
          if ( od_pi != null ){
         
            String  local_usn = (String)od_pi.getIPC().invoke( "getUSN", new Object[0] );
         
            String  od_usn = device.getRootDevice().getUSN();
           
              // we end up with "::upnp:rootdevice" on the end of this - remove
           
View Full Code Here

  {
    List<NetworkAdminNATDeviceImpl>  devices = new ArrayList<NetworkAdminNATDeviceImpl>();
   
    try{
 
        PluginInterface upnp_pi = azureus_core.getPluginManager().getPluginInterfaceByClass( UPnPPlugin.class );
       
        if ( upnp_pi != null ){
       
          UPnPPlugin upnp = (UPnPPlugin)upnp_pi.getPlugin();
         
          UPnPPluginService[]  services = upnp.getServices();
         
          for ( UPnPPluginService service: services ){
           
View Full Code Here

        throw( new NetworkAdminException( "Test already scheduled" ));
      }

      if ( type == TEST_TYPE_BT ){

        PluginInterface plugin = PluginInitializer.getDefaultInterface();

        currentTest = new NetworkAdminSpeedTestScheduledTestImpl(plugin, new NetworkAdminSpeedTesterBTImpl(plugin) );
            currentTest.getTester().setMode(type);

            currentTest.addListener(
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.