Package org.gudy.azureus2.core3.util

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


        final Shell shellAffected = (Shell) invoke(Display.class,
            Display.getCurrent(), "findWidget", new Object[] {
              windowId
            });

        Utils.execSWTThread(new AERunnable() {
          public void runSupport() {
            int type;
            Long l = (Long) shellAffected.getData("OSX.ToolBarToggle");
            if (l == null || l.longValue() == 0) {
              type = SWT.Collapse;
View Full Code Here


  // @see org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderListener#completed(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader, java.io.InputStream)
  public boolean completed(ResourceDownloader downloader, InputStream data) {
    downloader.removeListener(this);
    if (!nextUpdate()) {
      // fire in another thread so completed function can exit
      AEThread thread = new AEThread("AllDownloadsComplete", true) {
        public void runSupport() {
          allDownloadsComplete();
        }
      };
      thread.start();
    }
    return true;
  }
View Full Code Here

      new Listener()
      {
        public void
        handleEvent(Event event)
        {
          new AEThread2("GenerateNetDiag", true)
          {
            public void run() {
              StringWriter sw = new StringWriter();
             
              PrintWriter  pw = new PrintWriter( sw );
View Full Code Here

    progress.setLayoutData( data );
   
    parent.layout( true, true );
   
    new AEThread2( "SimpleInstallerUI", true )
    {
      public void
      run()
      {
        try{
View Full Code Here

      url = url.substring(0,pos);
       
      final AESemaphore[]        went_async     = { null };
      final ByteArrayOutputStream[]  async_stream  = { null };
     
      AsyncController  async_control =
        new AsyncController()
        {
          public void
          setAsyncStart()
          {
            went_async[0] = new AESemaphore( "async" );
View Full Code Here

  setAsynchronous(
    boolean a )
 
    throws IOException
  {
    AsyncController async_control = request.getAsyncController();
   
    if ( async_control == null ){
     
      throw( new IOException( "Request is not non-blocking" ));
    }
   
    if ( a ){
     
      is_async  = true;
     
      async_control.setAsyncStart();
     
    }else{
     
      is_async  = false;
     
      complete();
     
      async_control.setAsyncComplete();
    }
  }
View Full Code Here

          break;
        }
       
        payload_buffer.flip();
       
        messages.add( new GenericMessage( msg_type, msg_desc, new DirectByteBuffer( payload_buffer ), false ));
       
        buffers[1= null;
      }
     
      total_read += bytes_read;
View Full Code Here

    if( core_msg == null ) {
      return plug_msg.create( data );
    }
   
    try{
      return new MessageAdapter( core_msg.deserialize( new DirectByteBuffer( data ), (byte)1 ) );
    }
    catch( com.aelitis.azureus.core.peermanager.messaging.MessageException e ) {
      throw new MessageException( e.getMessage() );
    }
  }
View Full Code Here

    }
   
    ByteBuffer[] bbs = plug_msg.getPayload();
    DirectByteBuffer[] dbbs = new DirectByteBuffer[ bbs.length ]//TODO cache it???
    for( int i=0; i < bbs.length; i++ ) {
      dbbs[i] = new DirectByteBuffer( bbs[i] );
    }
    return dbbs;
  }
View Full Code Here

            public void run() {
              StringWriter sw = new StringWriter();
             
              PrintWriter  pw = new PrintWriter( sw );
                 
              IndentWriter iw = new IndentWriter( pw );
             
              NetworkAdmin admin = NetworkAdmin.getSingleton();
             
              admin.generateDiagnostics( iw );
             
View Full Code Here

TOP

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

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.