Package org.gudy.azureus2.core3.util

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


  reportFailed(
    final Throwable  error )
  {
    setFailed();
   
    new AEThread2( "SESTSConnection:failed", true )
    {
      public void
      run()
      {
        try{
View Full Code Here


  public void
  asyncDownload()
  {
    final Object  parent_tls = TorrentUtils.getTLS();

    AEThread2  t =
      new AEThread2( "ResourceDownloader:asyncDownload - " + trimForDisplay( original_url ), true )
      {
        public void
        run()
        {
          Object  child_tls = TorrentUtils.getTLS();
         
          TorrentUtils.setTLS( parent_tls );
         
          try{
            download();
           
          }catch ( ResourceDownloaderException e ){
           
          }finally{
           
            TorrentUtils.setTLS( child_tls );
          }
         
        }
      };
         
    t.start();
  }
View Full Code Here

  public void
  createThread(
    String      name,
    final Runnable  target )
  {
    AEThread2 t =
      new AEThread2( pi.getPluginName() + "::" + name, true )
      {
        public void
        run()
        {
          callWithPluginThreadContext( pi, target );
        }
      };
     
    t.start();
  }
View Full Code Here

  {
    if (Logger.isEnabled()) {
      Logger.log(new LogEvent(getTorrent(), LOGID, "Force stopping " + url + " as private torrent" ));
    }
   
    new AEThread2( "TRMux:fs", true )
    {
      public void
      run()
      {
        try{
View Full Code Here

      delayed_tasks_sem.release();
     
      if ( delayed_task_thread == null ){
       
        delayed_task_thread =
          new AEThread2( "Utilities:delayedTask", true )
          {
            public void
            run()
            {
              try{
View Full Code Here

               
        informActivity( getLogIndent() + ( file.isDirectory()?"Processing: ":"Downloading: " ) + getName());
       
        final Object  parent_tls = TorrentUtils.getTLS();
       
        AEThread2 t =
          new AEThread2( "ResourceDownloaderTimeout", true )
          {
            public void
            run()
            {
              Object  child_tls = TorrentUtils.getTLS();
             
              TorrentUtils.setTLS( parent_tls );
             
              try{
               
                  // download of a local dir -> null inputstream
               
                if ( file.isDirectory()){
                 
                  completed( ResourceDownloaderFileImpl.this, null );

                }else{
               
                  completed( ResourceDownloaderFileImpl.this, new FileInputStream( file ));
                }
               
              }catch( Throwable e ){
               
                failed( ResourceDownloaderFileImpl.this, new ResourceDownloaderException( ResourceDownloaderFileImpl.this, "Failed to read file", e ));
               
                Debug.printStackTrace( e );
               
              }finally{
               
                TorrentUtils.setTLS( child_tls );
              }
            }
          };
           
        t.start();
      }
    }finally{
     
      this_mon.exit();
    }
View Full Code Here

            try{
              final AESemaphore done_sem = new AESemaphore( "PluginInstall:fio" );
                                 
              final UIManager ui_manager = StaticUtilities.getUIManager( 120*1000 );
                 
              new AEThread2( "PluginInstall:fio", true )
                {
                  public void
                  run()
                  {
                    if ( installer.isAlreadyInstalled()){
View Full Code Here

    private volatile boolean  destroyed;
   
    protected
    ProtocolTimer()
    {
      new AEThread2( "UDPConnectionManager:timer", true )
      {
        private int  tick_count;
       
        public void
        run()
View Full Code Here

    }else if type == RT_AZ2_REQUEST_SEND_TORRENT ){
     
      try{
        final Torrent  torrent = plugin.getPluginInterface().getTorrentManager().createFromBEncodedData((byte[])request.get( "torrent" ));
     
        new AEThread2( "torrentAdder", true )
        {
          public void
          run()
          {
            PluginInterface pi = plugin.getPluginInterface();
View Full Code Here

              }
            })
       
        final AESemaphore start_sem = new AESemaphore( "TiVo:CtrlListener" );
       
        new AEThread2( "TiVo:CtrlListener", true )
        {
          public void
          run()
          {
            start_sem.release();
View Full Code Here

TOP

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

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.