Package org.gudy.azureus2.pluginsimpl.local.torrent

Examples of org.gudy.azureus2.pluginsimpl.local.torrent.TorrentImpl


                 
                  ResourceDownloader mr_rd = rdf.getMetaRefreshDownloader( url_rd );
   
                  InputStream is = mr_rd.download();
   
                  Torrent torrent = new TorrentImpl( TOTorrentFactory.deserialiseFromBEncodedInputStream( is ));
                           
                  // PlatformTorrentUtils.setContentTitle(torrent, torr );
             
                  DownloadManager dm = PluginInitializer.getDefaultInterface().getDownloadManager();
                 
                  Download  download;
                 
                  boolean auto_start = manager.shouldAutoStart( torrent );
                 
                  if ( auto_start ){
                 
                    download = dm.addDownload( torrent );
                   
                  }else{
                 
                    download = dm.addDownloadStopped( torrent, null, null );
                  }
                 
                  log( subs.getName() + ": added download " + download.getName()+ ": auto-start=" + auto_start );

                  subs.addAssociation( torrent.getHash());
                 
                  result.setRead( true );
                                   
                  if ( tried_ref_switch ){
                   
View Full Code Here


         
            // PlatformTorrentUtils.setContentThumbnail(torrent, thumbnail);
           
          TorrentUtils.setFlag( torrent, TorrentUtils.TORRENT_FLAG_LOW_NOISE, true );
         
          Torrent t = new TorrentImpl( torrent );
         
          t.setDefaultEncoding();
         
          t.writeToFile( torrent_file );
         
          download = dm.addDownload( t, torrent_file, data_file );
         
          download.setFlag( Download.FLAG_DISABLE_AUTO_FILE_MOVE, true );
View Full Code Here

      InputStream  is = rd.download();
     
      try{   
        TOTorrent  torrent = TOTorrentFactory.deserialiseFromBEncodedInputStream( is );
     
        return( new AzureusPlatformContent( new TorrentImpl( torrent )));
       
      }finally{
       
        is.close();
      }
View Full Code Here

    {
      if (this.torrent != null) {return this.torrent;}
     
        TOTorrent torrent = download_manager.getTorrent();
        if (torrent == null) {return null;}
        this.torrent = new TorrentImpl(torrent);
        return this.torrent;
    }
View Full Code Here

    return config;
  }


  public PluginConfigUIFactory getPluginConfigUIFactory() {
    return new PluginConfigUIFactoryImpl(config,pluginConfigKey);
  }
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

    warningIcon = imageLoader.getImage("image.sidebar.vitality.alert");
    infoIcon   = imageLoader.getImage("image.sidebar.vitality.info");
    updateStatusWarnings();
    Messages.setLanguageText(statusWarnings,
        "MainWindow.status.warning.tooltip");
    Alerts.addMessageHistoryListener(new AlertHistoryListener() {
      public void alertHistoryAdded(LogAlert params) {
        updateStatusWarnings();
      }
      public void alertHistoryRemoved(LogAlert alert) {
        updateStatusWarnings();
View Full Code Here

    itemDownSpeedManual.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        String kbps_str = MessageText.getString("MyTorrentsView.dialog.setNumber.inKbps",
            new String[]{ DisplayFormatters.getRateUnit(DisplayFormatters.UNIT_KB ) });

        SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow();
        entryWindow.initTexts("MyTorrentsView.dialog.setSpeed.title",
            new String[] {
              MessageText.getString(up_menu
                  ? "MyTorrentsView.dialog.setNumber.upload"
                  : "MyTorrentsView.dialog.setNumber.download")
            }, "MyTorrentsView.dialog.setNumber.text", new String[] {
              kbps_str,
              MessageText.getString(up_menu
                  ? "MyTorrentsView.dialog.setNumber.upload"
                  : "MyTorrentsView.dialog.setNumber.download")
            });

        entryWindow.prompt(new UIInputReceiverListener() {
          public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
            if (!entryWindow.hasSubmittedInput()) {
              return;
            }
            String sReturn = entryWindow.getSubmittedInput();

            if (sReturn == null)
              return;

            int newSpeed;
View Full Code Here

          new Listener()
        {
              public void
          handleEvent(Event event)
              {
                new CertificateCreatorWindow();
              }
          });
     
      new Label(gSecurity, SWT.NULL );
     
View Full Code Here

  public static MenuItem addBetaMenuItem(Menu menuParent) {
    final MenuItem menuItem = addMenuItem(menuParent, MENU_ID_BETA_PROG,
        new Listener() {
          public void handleEvent(Event e) {
            new BetaWizard();
      }
    });

    COConfigurationManager.addAndFireParameterListener(
        "Beta Programme Enabled", new ParameterListener() {
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.pluginsimpl.local.torrent.TorrentImpl

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.