Package org.gudy.azureus2.plugins.utils.search

Examples of org.gudy.azureus2.plugins.utils.search.SearchInitiator


   *
   * @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

    while( true ){
     
      try{
        Thread.sleep(1000);
       
        SearchInitiator si = plugin_interface.getUtilities().getSearchInitiator();

        SearchProvider[] providers = si.getProviders();
       
        System.out.println( "search providers=" + providers.length );
       
        if ( providers.length > 0 ){
         
          Map<String,String> properties = new HashMap<String,String>();
       
          properties.put( SearchInitiator.PR_SEARCH_TERM, "monkey" );
          properties.put( SearchInitiator.PR_MATURE, "true" );
         
          /*
           *
          final boolean[] complete = {false};

          Search s =
            si.createSearch(
              providers,
              properties,
              new SearchListener()
              {
                public void
                receivedResults(
                  SearchProviderResults[]    results )
                {
                  System.out.println( "received results" );
                 
                  for ( SearchProviderResults result: results ){
                   
                    System.out.println( "    " + result.getProvider().getProperty( SearchProvider.PR_NAME ) + ": comp=" + result.isComplete() + ", error=" + result.getError());
                   
                    SearchResult[] srs = result.getResults();
                   
                    for ( SearchResult sr: srs ){
                     
                      System.out.println( "        " + sr.getProperty( SearchResult.PR_NAME ));
                    }
                  }
                }
               
                public void
                completed()
                {
                  System.out.println( "received completed" );
                 
                  complete[0] = true;
                }
              });
         
          while( !complete[0] ){
           
            Thread.sleep(1000);
           
            System.out.println( "waiting for results" );
          }
          */
         
         
          Search s = si.createSearchproviders, properties, null );
         
          while( !s.isComplete()){
           
            Thread.sleep(1000);
           
View Full Code Here

    props         = new propertyWrapper(_props );
    pluginDir       = _pluginDir;
    config         = new PluginConfigImpl(this,pluginConfigKey);
    given_plugin_id      = _plugin_id;
    plugin_version    = _plugin_version;
    ipc_interface      = new IPCInterfaceImpl( initialiser, plugin );
    state                 = new PluginStateImpl(this, initialiser);
   
    boolean verified   = false;
    boolean bad    = false;
   
View Full Code Here

  }
 
  public IPFilter
  getIPFilter()
  {
    return( new IPFilterImpl());
  }
View Full Code Here

 
  public Logger getLogger()
  {
    if ( logger == null ){
     
      logger = new LoggerImpl( this );
    }
   
    return( logger );
  }
View Full Code Here

    else {
      plug_msg = new MessageAdapter( message )//core created
    }
   
    RawMessage raw_plug = plug_encoder.encodeMessage( plug_msg );
    return new com.aelitis.azureus.core.networkmanager.RawMessage[]{ new RawMessageAdapter( raw_plug )};
  }
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

TOP

Related Classes of org.gudy.azureus2.plugins.utils.search.SearchInitiator

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.