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

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


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

      managers = new ArrayList<searchManager>( search_managers );
    }
   
    if ( managers.size() == 0 ){
     
      throw( new SearchException( "No search managers registered - try later" ));
    }
   
    return( managers.get(0));
  }
View Full Code Here

    public void
    engineFailed(
      Engine     engine,
      Throwable   cause )
    {
      failed( engine, new SearchException( "Search failed", cause ));
    }
View Full Code Here

    public void
    engineRequiresLogin(
      Engine     engine,
      Throwable   cause )
    {
      failed( engine, new SearchException( "Authentication required", cause ));
    }
View Full Code Here

      Map<String,Object>  search_parameters,
      SearchObserver    observer )
   
      throws SearchException
    {
      throw( new SearchException( "Not supported" ));
    }
View Full Code Here

     
          Long  id = (Long)providers[i].getProperty( SearchProvider.PR_ID );
     
          if ( id == null ){
       
            throw( new SearchException( "Unknown provider - no id available" ));
          }
         
          pids[i] = id;
      }
      }
View Full Code Here

     String  search_term = properties.get( SearchInitiator.PR_SEARCH_TERM );
    
     if ( search_term == null ){
      
       throw( new SearchException( "Search term is mandatory" ));
     }
    
    sps.add( new SearchParameter( "s", search_term ));

     String  mature     = properties.get( SearchInitiator.PR_MATURE );
     
    if ( mature != null ){
     
      sps.add( new SearchParameter( "m", mature.toString()));
    }
 
    SearchParameter[] parameters = (SearchParameter[])sps.toArray(new SearchParameter[ sps.size()] );

    Map<String,String>  context = new HashMap<String, String>();
   
    context.put( Engine.SC_FORCE_FULL, "true" );

    String  headers     = null;
    int    max_per_engine  = 256;
   
    SearchObject search = new SearchObject( listener );
   
    Engine[]  used_engines;
   
    if ( provider_ids.length == 0 ){
     
      used_engines = getMetaSearch().search( search, parameters, headers, context, max_per_engine );

    }else{
     
      List<Engine>  selected_engines = new ArrayList<Engine>();
     
      for ( long id: provider_ids ){
       
        Engine engine = meta_search.getEngine( id );
       
        if ( engine == null ){
         
          throw( new SearchException( "Unknown engine id - " + id ));
         
        }else{
         
          selected_engines.add( engine );
        }
View Full Code Here

              try{
                return( searchSubscriptions( search_parameters, observer ));
               
              }catch( Throwable e ){
               
                throw( new SearchException( "Search failed", e ));
              }
            }
           
            public Object
            getProperty(
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

TOP

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

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.