net.i2p.client.naming
Class EepGetAndAddNamingService

java.lang.Object
  extended by net.i2p.client.naming.NamingService
      extended by net.i2p.client.naming.EepGetNamingService
          extended by net.i2p.client.naming.EepGetAndAddNamingService

public class EepGetAndAddNamingService
extends EepGetNamingService

Simple extension to EepGetNamingService to append what we find to hosts.txt, so we only have to do an EepGet query once. Note that there is little protection - there are a lot of validity checks in addressbook that are not included here. MUST be used from MetaNamingService, after HostsTxtNamingService. Cannot be used as the only NamingService! Be sure any naming service hosts are in hosts.txt. If this isn't after HostsTxtNamingService, you will clog up your hosts.txt with duplicate entries. Sample config to put in configadvanced.jsp (restart required): i2p.naming.impl=net.i2p.client.naming.MetaNamingService i2p.nameservicelist=net.i2p.client.naming.HostsTxtNamingService,net.i2p.client.naming.EepGetAndAddNamingService i2p.naming.eepget.list=http://stats.i2p/cgi-bin/hostquery.cgi?a=,http://i2host.i2p/cgi-bin/i2hostquery?

Since:
0.7.9
Author:
zzz

Field Summary
 
Fields inherited from class net.i2p.client.naming.NamingService
_context, CACHE_MAX_AGE, CACHE_MAX_SIZE, PROP_IMPL
 
Constructor Summary
EepGetAndAddNamingService(I2PAppContext context)
           
 
Method Summary
 Destination lookup(java.lang.String hostname)
          Look up a host name.
 
Methods inherited from class net.i2p.client.naming.NamingService
createInstance, getCache, lookupBase64, putCache, reverseLookup, reverseLookup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EepGetAndAddNamingService

public EepGetAndAddNamingService(I2PAppContext context)
Method Detail

lookup

public Destination lookup(java.lang.String hostname)
Description copied from class: NamingService
Look up a host name.

Overrides:
lookup in class EepGetNamingService
Returns:
the Destination for this host name, or null if name is unknown.