Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.AEThread2$threadWrapper


      timer_targets.add( reg );

      if ( timer_thread == null ){

        timer_thread =
          new AEThread2( "PeerManager:timeouts", true )
        {
          public void
          run()
          {
            int  idle_time  = 0;
View Full Code Here


 
      if ( pi != null ){
       
        final DHTTrackerPlugin plugin = (DHTTrackerPlugin)pi.getPlugin();
       
        new AEThread2( "LWS:waitForPlug", true )
        {
          public void
          run()
          { 
            try{
View Full Code Here

          }
        });
   
    if ( networks.size() > 1 || LOAD_ALL_NETWORKS ){
     
      new AEThread2( "CNetwork:init"true )
      {
        public void
        run()
        {
          checkForUpdates();
View Full Code Here

        stream_details = stream_factory.getStream( this );
       
        final InputStream stream = stream_details.getStream();
       
        new AEThread2( "DMS:reader", true )
        {
          public void
          run()
          {
            final int BUFF_SIZE = 128*1024;
 
View Full Code Here

       
      } else {

      }
      loadingDone = false;
      AEThread2 progressMover = new AEThread2("progressMover",true) {
        public void run() {
          final int[] waitTime = new int[1];
          waitTime[0]= 100;
          while(!loadingDone) {
            if(display != null && ! display.isDisposed()) {
              display.asyncExec(new Runnable() {
                public void run() {
                  if(loadingProgress != null && !loadingProgress.isDisposed()) {
                    int currentSelection = loadingProgress.getSelection() +1;
                    loadingProgress.setSelection(currentSelection);
                    if(currentSelection > (loadingProgress.getMaximum()) * 80 / 100) {
                      waitTime[0] = 300;
                    }
                    if (currentSelection > (loadingProgress.getMaximum()) * 90 / 100) {
                      waitTime[0] = 1000;
                    }
                  } else {
                    loadingDone = true;
                  }
                }
              });
            }
            try {
              Thread.sleep(waitTime[0]);
              //Thread.sleep(100);
            } catch (Exception e) {
              loadingDone = true;
            }
          }
        }
      };
      progressMover.start();
     
    } catch(Exception e) {
      failed(null,null);
    }
    animatedImage.start();
View Full Code Here

    AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(final AzureusCore core) {
        if (triggerInThread == TriggerInThread.ANY_THREAD) {
          l.azureusCoreRunning(core);
        } else if (triggerInThread == TriggerInThread.NEW_THREAD) {
          new AEThread2("CoreWaiterInvoke", true) {
            public void run() {
              l.azureusCoreRunning(core);
            }
          }.start();
        }
View Full Code Here

        }
      });
     
    turnOnButton.setEnabled( !no_space_available );
         
    new AEThread2( "scanner", true )
    {
      private long  last_avail = no_space_available?0:Long.MAX_VALUE;
     
      public void
      run()
View Full Code Here

  }
 
  protected void
  cancelTest()
  {
    new AEThread2( "NetStatus:cancel", true )
      {
        public void
        run()
        {
          cancelTestSupport();
View Full Code Here

    final BrowserMessageListener listener = getListener(listenerId);
    if (listener == null) {
      context.debug("No listener registered with ID " + listenerId);
    } else {
      new AEThread2("dispatch for " + listenerId, true) {
        public void run() {
          listener.handleMessage(message);
          message.complete(true, true, null);
        }
      }.start();
View Full Code Here

                  {
                 
                    public void
                    run()
                    {
                      AEThread2  t =
                        new AEThread2( "DHTTrackerPlugin:init", true )
                        {
                          public void
                          run()
                          {
                            try{
                           
                              if ( dht.isEnabled()){
                             
                                log.log( "DDB Available" );
                                 
                                model.getStatus().setText( MessageText.getString( "DHTView.activity.status.false" ));
                               
                                initialise();
                                 
                              }else{
                               
                                log.log( "DDB Disabled" );
                               
                                model.getStatus().setText( MessageText.getString( "dht.status.disabled" ));
                                 
                                notRunning();
                              }
                            }catch( Throwable e ){
                               
                              log.log( "DDB Failed", e );
                               
                              model.getStatus().setText( MessageText.getString( "DHTView.operations.failed" ));
                               
                              notRunning();
                             
                            }finally{
                             
                              initialised_sem.releaseForever();
                            }
                          }
                        };
                                     
                        t.start();
                    }
                  });
             
              dt.queue();
 
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.AEThread2$threadWrapper

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.