Package org.gudy.azureus2.plugins.installer

Examples of org.gudy.azureus2.plugins.installer.StandardPlugin


  data.heightHint = 100;
  link_area.getComponent().setLayoutData(data);

  CoreWaiterSWT.waitForCore(TriggerInThread.NEW_THREAD, new AzureusCoreRunningListener() {
    public void azureusCoreRunning(AzureusCore core) {
      final StandardPlugin plugins[];
      try {
        plugins = ((InstallPluginWizard)wizard).getStandardPlugins(core);
       
        Arrays.sort(
          plugins,
        new Comparator()
      {
            public int
        compare(
          Object o1,
          Object o2)
            {
              return(((StandardPlugin)o1).getName().compareToIgnoreCase(((StandardPlugin)o2).getName()));
            }
      });
     
      } catch(final Exception e) {
       
        Debug.printStackTrace(e);
        wizard.getDisplay().asyncExec(new AERunnable() {
            public void runSupport() {
              link_area.addLine( Debug.getNestedExceptionMessage(e));
            }
        });
       
        return;
      }
     
      wizard.getDisplay().asyncExec(new AERunnable() {
        public void runSupport() {
        
          lblStatus.setText( ((InstallPluginWizard)wizard).getListTitleText());
         
          List  selected_plugins = ((InstallPluginWizard)wizard).getPluginList();

          for(int i = 0 ; i < plugins.length ; i++) {
            StandardPlugin plugin = plugins[i];
            if(plugin.getAlreadyInstalledPlugin() == null) {
              if(pluginList == null || pluginList.isDisposed())
                return;
              TableItem item = new TableItem(pluginList,SWT.NULL);
              item.setData(plugin);
              item.setText(0,plugin.getName());
              boolean  selected = false;
              for (int j=0;j<selected_plugins.size();j++){
                if (((StandardPlugin)selected_plugins.get(j)).getId() == plugin.getId()){
                  selected = true;
                }
              }
              item.setChecked( selected );
              item.setText(1,plugin.getVersion());
            }
          }
         
            // if there's only one entry then we might as well pull it in (this is really to
            // support explicit install directions in the wizard as opposed to selection from
View Full Code Here


    {
      link_area.reset();
     
      link_area.addLine( MessageText.getString( "installPluginsWizard.details.loading"));
    
        final StandardPlugin plugin = (StandardPlugin) selected_item.getData();
       
       
        AEThread detailsLoader = new AEThread("Detail Loader") {
          public void runSupport() {          
           final String description = HTMLUtils.convertListToString(HTMLUtils.convertHTMLToText(plugin.getDescription(),""));
           wizard.getDisplay().asyncExec(new AERunnable() {
            public void runSupport() {
              if(pluginList == null || pluginList.isDisposed() || pluginList.getSelectionCount() ==0)
                return;
              if(pluginList.getSelection()[0] != selected_item)
                return;
          
              link_area.reset();
             
              link_area.setRelativeURLBase( plugin.getRelativeURLBase());
             
              link_area.addLine(description);
            }
            });
          }
View Full Code Here

 
    try{
     
      installer = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInstaller();
     
       StandardPlugin sp = installer.getStandardPlugin( plugin_id );
           
       if ( sp == null ){
        
         throw( new Exception( "Unknown plugin" ));
       }
View Full Code Here

   
    try{
     
      installer = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInstaller();
     
       StandardPlugin sp = installer.getStandardPlugin( "azemp" );
           
      Map<Integer, Object> properties = new HashMap<Integer, Object>();
 
      properties.put( UpdateCheckInstance.PT_UI_STYLE, UpdateCheckInstance.PT_UI_STYLE_NONE );
       
View Full Code Here

      public void parameterChanged(Parameter param) {
        CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
          public void azureusCoreRunning(AzureusCore core) {
            try {
              PluginInstaller installer = core.getPluginManager().getPluginInstaller();
              StandardPlugin itunes_plugin = installer.getStandardPlugin("azitunes");
             
              itunes_plugin.install(false);
             
            } catch (Throwable e) {
             
              Debug.printStackTrace(e);
            }
View Full Code Here

  public MessageStreamEncoderAdapter( MessageStreamEncoder plug_encoder ) {
    this.plug_encoder = plug_encoder;
  }
 
  public com.aelitis.azureus.core.networkmanager.RawMessage[] encodeMessage( com.aelitis.azureus.core.peermanager.messaging.Message message ) {
    Message plug_msg;
   
    if( message instanceof MessageAdapter ) {  //original message created by plugin, unwrap
      plug_msg = ((MessageAdapter)message).getPluginMessage();
    }
    else {
View Full Code Here

 
    throws MessageException
  {
    if ( incoming ){
     
      throw( new MessageException( "Already connected" ));
    }
   
    if ( connecting ){
     
      throw( new MessageException( "Connect already performed" ));
    }
   
    connecting  = true;
   
    if ( closed ){
     
      throw( new MessageException( "Connection has been closed" ));
    }
   
    InetSocketAddress  tcp_ep = endpoint.getTCP();
       
    if ( tcp_ep != null ){
     
      connectTCP( initial_data, tcp_ep );
     
    }else{
     
      InetSocketAddress  udp_ep = endpoint.getUDP();

      if ( udp_ep != null ){
       
        connectUDP( initial_data, udp_ep, false );
       
      }else{
       
        throw( new MessageException( "No protocols availabld" ));
      }
    }
  }
View Full Code Here

                delegate.close();
               
              }catch( Throwable e ){
              }
             
              reportFailed( new MessageException( "Connection has been closed" ));

            }else{
             
              reportConnected();
            }
View Full Code Here

              final InetSocketAddress  target,
              Map            reply )
            {
              if ( closed ){
                             
                reportFailed( new MessageException( "Connection has been closed" ));

              }else{
               
                connect_method_count++;

                if ( TEST_TUNNEL ){
                 
                  initial_data.rewind();
                 
                  connectTunnel( initial_data, gen_udp, rendezvous, target );
                 
                }else{
               
                  udp_delegate.connect(
                      initial_data,
                      new GenericMessageConnectionAdapter.ConnectionListener()
                      {
                        private boolean  connected;
                       
                        public void
                        connectSuccess()
                        {
                          connected  = true;
                         
                          setDelegate( udp_delegate );
                         
                          if ( closed ){
                           
                            try{
                              delegate.close();
                             
                            }catch( Throwable e ){                         
                            }
                           
                            reportFailed( new MessageException( "Connection has been closed" ));
                           
                          }else{
                           
                            reportConnected();
                          }                       
                        }
                       
                        public void
                        connectFailure(
                          Throwable failure_msg )
                        {
                          if ( connected ){
                           
                            reportFailed( failure_msg );
                           
                          }else{
                           
                            initial_data.rewind();
 
                            connectTunnel( initial_data, gen_udp, rendezvous, target );
                          }
                        }
                      });
                }
              }
            }
           
            public void
            failed(
              int      failure_type )
            {
              reportFailed( new MessageException( "UDP connection attempt failed - NAT traversal failed (" + NATTraversalObserver.FT_STRINGS[ failure_type ] + ")"));
            }
           
            public void
            failed(
              Throwable   cause )
            {
              reportFailed( cause );
            }
           
            public void
            disabled()
            {
              reportFailed( new MessageException( "UDP connection attempt failed as DDB is disabled" ));
            }
          });
    }else{
 
      udp_delegate.connect(
          initial_data,
          new GenericMessageConnectionAdapter.ConnectionListener()
          {
            private boolean  connected;
           
            public void
            connectSuccess()
            {
              connected  = true;
             
              setDelegate( udp_delegate );
             
              if ( closed ){
               
                try{
                  delegate.close();
                 
                }catch( Throwable e ){ 
                }
               
                reportFailed( new MessageException( "Connection has been closed" ));

              }else{
               
                reportConnected();
              }
View Full Code Here

               
              }catch( Throwable e ){
               
              }
             
              reportFailed( new MessageException( "Connection has been closed" ));

            }else{
             
              reportConnected();
            }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.installer.StandardPlugin

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.