Package org.gudy.azureus2.plugins.utils.xml.simpleparser

Examples of org.gudy.azureus2.plugins.utils.xml.simpleparser.SimpleXMLParserDocumentNode


          handleEvent(Event event)
          {
            try{
              PluginInterface pi = AzureusCoreFactory.getSingleton().getPluginManager().getDefaultPluginInterface();
             
              UpdateInstaller installer = pi.getUpdateManager().createInstaller();
           
              installer.addMoveAction(
                "C:\\temp\\file1", "C:\\temp\\file2" );
           
              installer.installNow(
                new UpdateInstallerListener()
                {
                  public void
                  reportProgress(
                    String    str )
View Full Code Here


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

          public void perform(TimerEvent ev) {
            performAutoCheck(false);
          }
        });

    DelayedTask delayed_task =
      UtilitiesImpl.addDelayedTask(
        "Update Check",
        new Runnable()
        {
          public void
          run()
          {
            // check for non-writeable app dir on non-vista platforms (vista we've got a chance of
            // elevating perms when updating) and warn user. Particularly useful on OSX when
            // users haven't installed properly
   
            if ( !( Constants.isWindowsVistaOrHigher || SystemProperties.isJavaWebStartInstance())){
   
              String  app_str = SystemProperties.getApplicationPath();
   
              if ( !new File(app_str).canWrite()){
   
                final UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
   
                if ( uiFunctions != null ){
   
                  if ( app_str.endsWith( File.separator )){
   
                    app_str = app_str.substring(0, app_str.length()-1);
                  }
                 
                  final String f_app_str = app_str;
                 
                  Utils.execSWTThread(
                    new Runnable()
                    {
                      public void
                      run()
                      {
                        UIFunctionsUserPrompter prompt =
                          uiFunctions.getUserPrompter(
                            MessageText.getString("updater.cant.write.to.app.title"),
                            MessageText.getString("updater.cant.write.to.app.details", new String[]{f_app_str}),
                            new String[]{ MessageText.getString( "Button.ok" )},
                            0 );
       
                        //prompt.setHtml( "http://a.b.c/" );
         
                        prompt.setIconResource( "warning" );
         
                        prompt.setRemember( "UpdateMonitor.can.not.write.to.app.dir.2", false,
                            MessageText.getString( "MessageBoxWindow.nomoreprompting" ));
         
                        prompt.open(null);
                      }
                    },
                    true );
                }
              }
            }
   
            performAutoCheck(true);
          }
        });
   
    delayed_task.queue();
  }
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

  private void start() {
    for (int i = 0; i < updates.length; i++) {
      Update update = updates[i];
      ResourceDownloader[] rds = update.getDownloaders();
      for (int j = 0; j < rds.length; j++) {
        ResourceDownloader rd = rds[j];
        downloaders.add(rd);
      }
    }

    iterDownloaders = downloaders.iterator();
View Full Code Here

   *
   * @since 3.0.0.7
   */
  private boolean nextUpdate() {
    if (iterDownloaders.hasNext()) {
      ResourceDownloader downloader = (ResourceDownloader) iterDownloaders.next();
      downloader.addListener(this);
      downloader.asyncDownload();
      return true;
    }
    return false;
  }
View Full Code Here

              }
             
              setProgress( 0 );
             
              downloader.addListener(
                new ResourceDownloaderAdapter()
                {
                  public void
                  reportPercentComplete(
                    ResourceDownloader  downloader,
                    int          percentage )
View Full Code Here

         
          RSSItem  item = items[j];
         
          System.out.println( "    item:" + item.getTitle() + ", desc = " + item.getDescription() + ", link = " + item.getLink());
         
          SimpleXMLParserDocumentNode  node = item.getNode();
         
          System.out.println( "        [hash] " + node.getChild( "torrent_sha1" ).getValue());
          System.out.println( "        [size] " + node.getChild( "torrent_size" ).getValue());
          System.out.println( "        [seed] " + node.getChild( "torrent_seeders" ).getValue());
          System.out.println( "        [leec] " + node.getChild( "torrent_leechers" ).getValue());
        }
      }
             
    }catch( Throwable e ){
     
View Full Code Here

       
        SimpleXMLParserDocumentNode[]  xml_channels = doc.getChildren();

        for (int i=0;i<xml_channels.length;i++){
         
          SimpleXMLParserDocumentNode  xml_channel = xml_channels[i];
         
          String  name = xml_channel.getName().toLowerCase();
         
          if ( name.equals("channel")){
           
            chans.add( new RSSChannelImpl( xml_channel, false ))
          }
View Full Code Here

      byte[]  torrent_hash       = null;
      byte[]  torrent_hash_override   = null;
     
      for (int i=0;i<kids.length;i++){
       
        SimpleXMLParserDocumentNode  kid = kids[i];
       
        String  name = kid.getName();
       
        if ( name.equalsIgnoreCase( "ANNOUNCE_URL")){
         
          try{
         
            announce_url = new URL(kid.getValue());
           
          }catch( MalformedURLException e ){
       
            throw( new TOTorrentException( "ANNOUNCE_URL malformed", TOTorrentException.RT_DECODE_FAILS));
          }
         
        }else if ( name.equalsIgnoreCase( "ANNOUNCE_LIST")){
         
          SimpleXMLParserDocumentNode[]  set_nodes = kid.getChildren();
         
          TOTorrentAnnounceURLGroup group = torrent.getAnnounceURLGroup();
         
          TOTorrentAnnounceURLSet[]  sets = new TOTorrentAnnounceURLSet[set_nodes.length];
         
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.utils.xml.simpleparser.SimpleXMLParserDocumentNode

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.