Examples of DHTOperationListener


Examples of com.aelitis.azureus.core.dht.DHTOperationListener

    dht.put(   key,
          description,
          value,
          flags,
          high_priority,
          new DHTOperationListener()
          {
            private boolean started;
           
            public void
            searching(
View Full Code Here

Examples of com.aelitis.azureus.core.dht.DHTOperationListener

    final boolean                exhaustive,
    final boolean                high_priority,
    final DHTPluginOperationListener      listener )
  {
    dht.get(   key, description, flags, max_values, timeout, exhaustive, high_priority,
          new DHTOperationListener()
          {
            private boolean  started = false;
           
            public void
            searching(
View Full Code Here

Examples of com.aelitis.azureus.core.dht.DHTOperationListener

    final String            description,
    final DHTPluginOperationListener  listener )
  {
    dht.remove(   key,
            description,
            new DHTOperationListener()
            {
              private boolean started;
             
              public void
              searching(
View Full Code Here

Examples of com.aelitis.azureus.core.dht.DHTOperationListener

    }
   
    dht.remove(   t_contacts,
            key,
            description,
            new DHTOperationListener()
            {
              private boolean started;
             
              public void
              searching(
View Full Code Here

Examples of com.aelitis.azureus.core.dht.DHTOperationListener

                    log( "Removing publish for " + current_local.getString() + " -> " + current_target.getString());
                   
                    dht.remove(
                        getPublishKey( current_local ),
                        "DHTNatPuncher: removal of publish",
                        new DHTOperationListener()
                        {
                          public void
                          searching(
                            DHTTransportContact  contact,
                            int          level,
                            int          active_searches )
                          {}
                         
                          public void
                          found(
                            DHTTransportContact  contact,
                            boolean        is_closest )
                          {}
                         
                          public void
                          diversified(
                            String    desc )
                          {
                          }
                         
                          public void
                          read(
                            DHTTransportContact  contact,
                            DHTTransportValue  value )
                          {}
                         
                          public void
                          wrote(
                            DHTTransportContact  contact,
                            DHTTransportValue  value )
                          {}
                         
                          public void
                          complete(
                            boolean        timeout )
                          {}
                        });
                  }
                 
                  if ( latest_local != null ){
               
                    log( "Adding publish for " + latest_local.getString() + " -> " + latest_target.getString());
                   
                    rendevzous_fail_count  = RENDEZVOUS_PING_FAIL_LIMIT - 2; // only 2 attempts to start with

                    dht.put(
                        getPublishKey( latest_local ),
                        "NAT Traversal: rendezvous publish",
                        encodePublishValue( latest_target ),
                        DHT.FLAG_SINGLE_VALUE,
                        new DHTOperationListener()
                        {
                          public void
                          searching(
                            DHTTransportContact  contact,
                            int          level,
                            int          active_searches )
                          {}
                         
                          public void
                          found(
                            DHTTransportContact  contact,
                            boolean        is_closest )
                          {}
                         
                          public void
                          diversified(
                            String    desc )
                          {
                          }
                         
                          public void
                          read(
                            DHTTransportContact  contact,
                            DHTTransportValue  value )
                          {}
                         
                          public void
                          wrote(
                            DHTTransportContact  contact,
                            DHTTransportValue  value )
                          {}
                         
                          public void
                          complete(
                            boolean        timeout )
                          {}
                        });
                  }
                }else if ( current_target != latest_target ){
                 
                    // here current_local == latest_local and neither is null!
                 
                    // target changed, update publish
                 
                  log( "Updating publish for " + latest_local.getString() + " -> " + latest_target.getString());

                  rendevzous_fail_count  = RENDEZVOUS_PING_FAIL_LIMIT - 2; // only 2 attempts to start with
                 
                  dht.put(
                      getPublishKey( latest_local ),
                      "DHTNatPuncher: update publish",
                      encodePublishValue( latest_target ),
                      DHT.FLAG_SINGLE_VALUE,
                      new DHTOperationListener()
                      {
                        public void
                        searching(
                          DHTTransportContact  contact,
                          int          level,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.