Examples of UpdateInstallerListener


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

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

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

                      final AESemaphore sem = new AESemaphore( "vmopt" );
                     
                      final UpdateException[]  error = { null };
                     
                      installer.installNow(
                        new UpdateInstallerListener()
                        {
                          public void
                          reportProgress(
                            String    str )
                          {
                          }
                         
                          public void
                          complete()
                          {                           
                            sem.release();
                          }
                         
                          public void
                          failed(
                            UpdateException  e )
                          {
                            error[0] = e;
                           
                            sem.release();
                          }
                        });
                     
                      sem.reserve();
                     
                      if ( error[0] != null ){
                       
                        throw( error[0] );
                      }
                     
                    }
                  }
                }else{
                    // redirect in place, might be second user so migrate if needed

                  if ( old_shared_options.exists() && !local_options.exists()){

                    if ( !FileUtil.copyFile( old_shared_options, local_options )){

                      Debug.out( "Failed to copy " + old_shared_options + " to " + local_options );
                    }
                  }
                }
              }else{

                  // no options
               
                if ( FileUtil.canReallyWriteToAppDirectory()){
                 
                  if ( !FileUtil.writeStringAsFile( shared_options, redirect + "\r\n" )){
                   
                    Debug.out( "Failed to write to " + shared_options );
                  }
                }else{
                 
                    // insufficient perms
                                   
                  UpdateInstaller installer = getInstaller( azureus_core );
               
                    // retry later
                 
                  if ( installer == null ){
                   
                    return;
                  }
                 
                 
                  if ( !informUpdateRequired()){
                   
                    return;
                  }

                  installer.addResource( "redirect", new ByteArrayInputStream( ( redirect + "\r\n" ).getBytes( "UTF-8" )));
                 
                  installer.addMoveAction( "redirect", shared_options.getAbsolutePath());
                   
                  final AESemaphore sem = new AESemaphore( "vmopt" );
                 
                  final UpdateException[]  error = { null };
                 
                  installer.installNow(
                    new UpdateInstallerListener()
                    {
                      public void
                      reportProgress(
                        String    str )
                      {
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.