Package org.gudy.azureus2.plugins.update

Examples of org.gudy.azureus2.plugins.update.Update


        }catch( ResourceDownloaderException e ){
       
          Debug.printStackTrace( e );
        }
       
        final Update update =
          checker.addUpdate("SWT Library for " + versionGetter.getPlatform(),
              new String[] {"SWT is the graphical library used by " + Constants.APP_NAME},
              "" + versionGetter.getLatestVersion(),
              swtDownloader,
              Update.RESTART_REQUIRED_YES
            );
       
        update.setDescriptionURL(versionGetter.getInfoURL());
       
        swtDownloader.addListener(new ResourceDownloaderAdapter() {
           
            public boolean
            completed(
              ResourceDownloader downloader,
              InputStream data)
            {
                //On completion, process the InputStream to store temp files
             
              return processData(checker,update,downloader,data);
            }
           
        public void
        failed(
          ResourceDownloader      downloader,
          ResourceDownloaderException e )
        {
          Debug.out( downloader.getName() + " failed", e );
         
          update.complete( false );
        }
          });
      }
    }catch( Throwable e ){
      Logger.log(new LogAlert(LogAlert.UNREPEATABLE,
View Full Code Here


          handleEvent(Event event)
          {
            try{
              PluginInterface pi = AzureusCoreFactory.getSingleton().getPluginManager().getDefaultPluginInterface();
             
              UpdateInstaller installer = pi.getUpdateManager().createInstaller();
           
              installer.addMoveAction(
                "C:\\temp\\file1", "C:\\temp\\file2" );
           
              installer.installNow(
                new UpdateInstallerListener()
                {
                  public void
                  reportProgress(
                    String    str )
View Full Code Here

           
              installer.addMoveAction(
                "C:\\temp\\file1", "C:\\temp\\file2" );
           
              installer.installNow(
                new UpdateInstallerListener()
                {
                  public void
                  reportProgress(
                    String    str )
                  {
View Full Code Here

          public void perform(TimerEvent ev) {
            performAutoCheck(false);
          }
        });

    DelayedTask delayed_task =
      UtilitiesImpl.addDelayedTask(
        "Update Check",
        new Runnable()
        {
          public void
          run()
          {
            // check for non-writeable app dir on non-vista platforms (vista we've got a chance of
            // elevating perms when updating) and warn user. Particularly useful on OSX when
            // users haven't installed properly
   
            if ( !( Constants.isWindowsVistaOrHigher || SystemProperties.isJavaWebStartInstance())){
   
              String  app_str = SystemProperties.getApplicationPath();
   
              if ( !new File(app_str).canWrite()){
   
                final UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
   
                if ( uiFunctions != null ){
   
                  if ( app_str.endsWith( File.separator )){
   
                    app_str = app_str.substring(0, app_str.length()-1);
                  }
                 
                  final String f_app_str = app_str;
                 
                  Utils.execSWTThread(
                    new Runnable()
                    {
                      public void
                      run()
                      {
                        UIFunctionsUserPrompter prompt =
                          uiFunctions.getUserPrompter(
                            MessageText.getString("updater.cant.write.to.app.title"),
                            MessageText.getString("updater.cant.write.to.app.details", new String[]{f_app_str}),
                            new String[]{ MessageText.getString( "Button.ok" )},
                            0 );
       
                        //prompt.setHtml( "http://a.b.c/" );
         
                        prompt.setIconResource( "warning" );
         
                        prompt.setRemember( "UpdateMonitor.can.not.write.to.app.dir.2", false,
                            MessageText.getString( "MessageBoxWindow.nomoreprompting" ));
         
                        prompt.open(null);
                      }
                    },
                    true );
                }
              }
            }
   
            performAutoCheck(true);
          }
        });
   
    delayed_task.queue();
  }
View Full Code Here

  {
    boolean  handled = false;
   
    for (int i=0;i<listeners.size();i++){
     
      PooledByteBuffer  buffer = new PooledByteBufferImpl(message.getPayload());
     
      try{
        ((GenericMessageConnectionListener)listeners.get(i)).receive( this, buffer );
       
        handled = true;
       
      }catch( Throwable f ){
       
        buffer.returnToPool();
       
        if ( !( f instanceof MessageException )){
       
          Debug.printStackTrace(f);
        }
View Full Code Here

  private void start() {
    for (int i = 0; i < updates.length; i++) {
      Update update = updates[i];
      ResourceDownloader[] rds = update.getDownloaders();
      for (int j = 0; j < rds.length; j++) {
        ResourceDownloader rd = rds[j];
        downloaders.add(rd);
      }
    }

    iterDownloaders = downloaders.iterator();
View Full Code Here

   *
   * @since 3.0.0.7
   */
  private boolean nextUpdate() {
    if (iterDownloaders.hasNext()) {
      ResourceDownloader downloader = (ResourceDownloader) iterDownloaders.next();
      downloader.addListener(this);
      downloader.asyncDownload();
      return true;
    }
    return false;
  }
View Full Code Here

              }
             
              setProgress( 0 );
             
              downloader.addListener(
                new ResourceDownloaderAdapter()
                {
                  public void
                  reportPercentComplete(
                    ResourceDownloader  downloader,
                    int          percentage )
View Full Code Here

    props         = new propertyWrapper(_props );
    pluginDir       = _pluginDir;
    config         = new PluginConfigImpl(this,pluginConfigKey);
    given_plugin_id      = _plugin_id;
    plugin_version    = _plugin_version;
    ipc_interface      = new IPCInterfaceImpl( initialiser, plugin );
    state                 = new PluginStateImpl(this, initialiser);
   
    boolean verified   = false;
    boolean bad    = false;
   
View Full Code Here

  }
 
  public IPFilter
  getIPFilter()
  {
    return( new IPFilterImpl());
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.update.Update

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.