Package com.aelitis.azureus.plugins.dht.impl

Examples of com.aelitis.azureus.plugins.dht.impl.DHTPluginImpl


                 
                    int    port = reseed_port.getValue();
                 
                    for (int i=0;i<dhts.length;i++){
                     
                      DHTPluginImpl  dht = dhts[i];
                   
                      if ( ip.length() == 0 || port == 0 ){
                       
                        dht.checkForReSeed( true );
                       
                      }else{
                       
                        if ( dht.importSeed( ip, port ) != null ){
                         
                          dht.integrateDHT( false, null );
                        }
                      }
                    }
                   
                  }finally{
View Full Code Here


                                };
                               
                        if ( MAIN_DHT_ENABLE ){
                         
                          main_dht =
                            new DHTPluginImpl(
                                  plugin_interface,
                                  AzureusCoreFactory.getSingleton().getNATTraverser(),
                                  adapter,
                                  DHTTransportUDP.PROTOCOL_VERSION_MAIN,
                                  DHT.NW_MAIN,
                                  false,
                                  override_ip,
                                  dht_data_port,
                                  reseed,
                                  warn_user,
                                  logging,
                                  log, dht_log );
                                         
                          plugins.add( main_dht );
                         
                          adapter = null;
                        }
                       
                        if ( MAIN_DHT_V6_ENABLE ){
                         
                          if ( NetworkAdmin.getSingleton().hasDHTIPV6()){
                             
                            main_v6_dht =
                              new DHTPluginImpl(
                                plugin_interface,
                                AzureusCoreFactory.getSingleton().getNATTraverser(),
                                adapter,
                                DHTTransportUDP.PROTOCOL_VERSION_MAIN,
                                DHT.NW_MAIN_V6,
                                true,
                                null,
                                dht_data_port,
                                reseed,
                                warn_user,
                                logging,
                                log, dht_log );
                                         
                            plugins.add( main_v6_dht );
                           
                            adapter = null;
                          }
                        }
                       
                        if ( Constants.isCVSVersion() && CVS_DHT_ENABLE ){
                         
                          cvs_dht =
                            new DHTPluginImpl(
                              plugin_interface,
                              AzureusCoreFactory.getSingleton().getNATTraverser(),
                              adapter,
                              DHTTransportUDP.PROTOCOL_VERSION_CVS,
                              DHT.NW_CVS,
View Full Code Here

   
    for (int i=0;i<targets.length;i++){
     
      DHTPluginContactImpl target = (DHTPluginContactImpl)targets[i];
     
      DHTPluginImpl dht = target.getDHT();
     
      List  c = (List)dht_map.get(dht);
     
      if ( c == null ){
       
        c = new ArrayList();
       
        dht_map.put( dht, c );
      }
     
      c.add( target );
    }
   
    Iterator  it = dht_map.entrySet().iterator();
   
    boolean   primary = true;
   
    while( it.hasNext()){
     
      Map.Entry entry = (Map.Entry)it.next();
     
      DHTPluginImpl   dht     = (DHTPluginImpl)entry.getKey();
      List      contacts   = (List)entry.getValue();
     
      DHTPluginContact[]  dht_targets = new DHTPluginContact[contacts.size()];
     
      contacts.toArray( dht_targets );
     
      if ( primary ){
       
        primary = false;
       
        dht.remove( dht_targets, key, description, listener );
       
      }else{
       
          // lazy - just report ops on one dht
       
        dht.remove(
            dht_targets, key, description,
            new DHTPluginOperationListener()
            {
              public void
              diversified()
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.plugins.dht.impl.DHTPluginImpl

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.